Check out www.bb4.com - they've got a GPL app that can monitor all sorts of 
stuff and send alerts.  If you can write shell scripts, it is simple enough 
to add your own monitors.

If you want something quick, just set this script to run via crontab.  You 
can modify the notfication even to suit your needs.  I use the email address 
for my cell phone so I get an alphnumeric page.

DP

---------------------------------------------------------------------
diskmonitor.sh
---------------------------------------------------------------------
#!/bin/sh

# set this to a reasonable percentage
warn_level=50

# this is where alerts will be sent
[EMAIL PROTECTED]

# check disk utilization using `df`
for percent in $(df | grep /dev/ | cut -c 52-54); do
         if [ $percent -gt $warn_level ]; then
                 # construct and send a message 
                 echo -e "subject: disk utilization warning on  \
                $(uname -n)\n\n$(df -h)"| sendmail $recipient 
                 # one warning should suffice    
                 break
         fi
done
---------------------------------------------------------------------


On Tuesday 23 January 2001 12:09, you wrote:
> Hi,
>
> Short of writing one, does anyone kno of a disk drive monitor that pops up
> a warning on your screen when your partition is almost full?
>
> l
#!/bin/sh
warn_level=50
[EMAIL PROTECTED]

for percent in $(df | grep /dev/ | cut -c 52-54); do
        if [ $percent -gt $warn_level ]; then
                echo "warning $percent"
                echo -e "subject: disk utilization warning on $(uname -n)\n\n$(df 
-h)"| sendmail @recipient 
                echo -e "subject: disk utilization warning on $(uname -n)\n\n$(df -h)"
                break
        fi
done

Reply via email to