Although IBM is now pushing system director concept into AIX as well, to monitor overall health of system, i still found following small shell script very helpfull which can be used to notify any new errors in AIX error log
-----------------------------------------------
#!/bin/ksh
# Script to notify new errors in AIX error log
TOTALERRS=`errpt | grep -v "IDENTIFIER" | wc -l`
if [ ! -f /usr/local/bin/errpt.count ]
then
echo 0 > /usr/local/bin/errpt.count
fi
OLDERRS=`cat /usr/local/bin/errpt.count`
((NEWERRS=TOTALERRS-OLDERRS))
if [ ${NEWERRS} -gt 1 ]
then
echo "Please check errpt, ${NEWERRS} errors found!" | /usr/bin/mailx -vs "`hostname`: errpt report" recipient@domain.com
elif [ ${NEWERRS} -gt 0 ]
then
errpt | grep -v "IDENTIFIER" | head -${NEWERRS} | cut -c 42- |
while read ERRMSG
do
echo "errpt:${ERRMSG}" | /usr/bin/mailx -vs "`hostname`: errpt report" recipient@domain.com
done
fi
echo ${TOTALERRS} > /usr/local/bin/errpt.count
exit 0
-----------------------------------------------
This is blog for IT Infrastructure consultants , who want to use latest technologies for building high profile solutions with reliability and high performance.
Subscribe to:
Post Comments (Atom)
How to Enable Graphical Mode on Red Hat 7 he recommended way to enable graphical mode on RHEL V7 is to install first following packages # ...
-
Putting the physical control panel in manual operating mode There are many instances , where you want to use ASMI interface to login to Hype...
-
While Lpars and Wpars are both virtualization features of IBM Power systems , there are inherently differences which do reside between Lpars...
-
Have u met any auditor who ask you about security of your backups? For most of system and database administrators it is an annoying question...
No comments:
Post a Comment