|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: disk check using perlby moklevat (Priest) |
| on Dec 14, 2007 at 16:36 UTC ( #657076=note: print w/ replies, xml ) | Need Help?? |
|
Rather than trying to parse the the df output yourself, you may find it easier to work with the Filesys::Df module. To send an e-mail to yourself, you should look into one of the many modules that exist to make this easy. I like MIME::Lite. Update: Here is some (untested) code to work with. You will have to modify the email message with your e-mail addresses, and you might want to tweak the language of the Subject and Data (body text) to suit your style. Otherwise, the script reads the percent disk used from / and e-mails you if the percentage if greater than a threshold amount (in this case 90%)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||