Script assumes default SME7 fstab.
Highlite and copy this
################
#!/bin/sh
DOMAIN=`/sbin/e-smith/db configuration get DomainName`
SYSTEM=`/sbin/e-smith/db configuration get SystemName`
df -P | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
# echo $output
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
partition=$(echo $output | awk '{ print $2 }' )
if [ $usep -ge 90 ]; then
echo "Running out of space \"$partition ($usep%)\" on $(hostname).$DOMAIN as on $(date)" | \
mail -s "ALERT: $usep% Disk Use on $SYSTEM.$DOMAIN" admin
fi
done
##############
Using Putty or similar...
cd /etc/cron.daily
pico diskusage.sh
Right click will paste into putty
edit .... $usep -ge 90... (default 90 will alert you at 90% usage, you can test it by making the 90 to be less than current disk use)
edit email recipient if you like (default is admin - can be anyone@anydomain)
CTRL X
Enter
Chmod 755 diskusage.sh