Reminder: never reinvent the wheel (df)

jdavidb on 2006-09-18T13:25:04

The drive with all of the files I pull and parse filled up over the weekend, so after clearing out what needs to be cleared out, I'm of course going to try to avoid the problem by writing a small program to email me with a warning every day if the drive is more than 80% full. Initially I was thinking of parsing the output of df, but I gave CPAN a quick check and found Filesys::DfPortable, which gives me everything I want. Far better to use someone else's debugged code.

Of course, really I'm still reinventing the wheel, because I should use an existing monitoring package like Big Brother or something to send these alerts. But that would require infrastructure support from above which I do not have. I could perhaps obtain it, but this box is slated for replacement anyway.

Update: arranged to get Big Brother to alert me after all, shouting over the cube wall. I had no idea support for this was even in my building. :)