Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

errpt and df -k 1

Status
Not open for further replies.

AIXFinder

IS-IT--Management
Jan 4, 2007
97
0
0
US
I am in need of two ksh scripts.

errpt

- want to rcv e-mail for **new** errpt lines rather than the entire errpt contents.

df -k

- want to rcv e-mail if the % used is over 90%, but I want to exclude some of filesystems as to some of them are always 95 % or higher.

thx much
 
Why are you looking for scripts!

use wsm! Its all there!

and regarding the errpt! i guess you can configer that as a class in the ODM i beleive! I don't remember that for now but i will come back to you on that if you want!

Regards,
Khalid
 
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 !!
 
See thread52-1228919. It may not give you what you want exactly, but it may point you in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top