Create two files:
1. dft.awk -containing below
$4 > 90
{
}
2. Create dft.sh
rm /tmp/dft.out
rm /tmp/dft.txt
rm /tmp/dft1.txt
df -k |tr -d '%' |tail +1 >/tmp/dft.out
awk -f dft.awk </tmp/dft.out >/tmp/dft1.txt
grep -iv "filesystem" /tmp/dft1.txt >/tmp/dft.txt
if [ -s '/tmp/dft.txt' ]
then
for email in `cat /db2/bin/ini/dft_email.ini` # Store
email/pager address/cell phone address in dft_email.ini
do
mail -s "File System Warning: Please Check " "$email"
</tmp/dft.txt
echo "emailing"
done
fi
Test the above and use it in crontab to monitor every minute.
vj wrote:
What are the various tasks which can be done to avoid the error message
" file System full" ?
Thanks,
Vj.