Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/usr/local/bin/perl
# do df on the file system in question
# root (/), in this example
# change the '/' to what ever mount point you want to check
# split the results of the backticks on a new line char
@df = split(/\n/,`df -k /`);
# you should get something like this back (no leading #s)
# Filesystem kbytes used avail capacity Mounted on
# /dev/dsk/c0t0d0s0 3339774 1359852 1946525 42% /
# split the '/dev/dsk...' line on multiple spaces
@fields = split(/ +/,$df[1]);
$percent_used = $fields[4];
chop($percent_used); # get rid of percent sign
print "%used - $percent_used %\n";
if ($percent_used > 79)
{
# do the mail stuff.
}