This is what I use for FS capacity alerts :
#!/bin/ksh
#
TDIR=/home/techsup/tmp
SDIR=/home/techsup/stats
SLIST=/home/techsup/bin/hqserver.lst
HOST=`hostname -s`
#
# **** Check local filesystems ****
#
echo "=================================" >>$SDIR/dfchk.txt
echo "\t\t$HOST" >$SDIR/dfchk.txt
df|grep -Ev "Used|:|cd0"|awk '{print $4, $7}'|sed "s/%//g"|\
awk '{if ( $1 >=90 ) print $1," " $2 }'>$TDIR/dfchk.txt 2>&1
#
if [ -s $TDIR/dfchk.txt ];then
cat $TDIR/dfchk.txt >>$SDIR/dfchk.txt
else
echo " No filesystems are over 90% full" >>$SDIR/dfchk.txt
fi
#
# **** Check remote filesystems ****
#
for N in `cat $SLIST|grep -v nim`
do
echo "\n\t\t$N" >>$SDIR/dfchk.txt
echo "=================================" >>$SDIR/dfchk.txt
rsh $N df|grep -Ev "Used|:|cd0"|awk '{print $4, $7}'|sed "s/%//g"|\
awk '{if ( $1 >=90 ) print $1," " $2 }'>$TDIR/dfchk.txt 2>&1
#
if [ -s $TDIR/dfchk.txt ];then
cat $TDIR/dfchk.txt >>$SDIR/dfchk.txt
else
echo " No filesystems are over 90% full" >>$SDIR/dfchk.txt
fi
done
#
# **** Email report ****
#
mail -s "AIX Filesystem Check" user@home.co.uk < $SDIR/dfchk.txt
#
# End of script
We did have a script to mail new entries from the errorlog but have not used it for a while. If I find it will update the post,
regards
Benno
...it really does get worse than this !!