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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Daily check activities

Status
Not open for further replies.

RaulGB

MIS
Oct 29, 2002
10
BO
Hello,

We are in the process of optimizing our monitoring activities, so we would like to gather some thoughts about what people usually focus on. Currently we check these items daily:

errpt
sar
df –k
topas
lpstat

in addition to our backup and application startup/stop logs.

Do you have any suggestions?

Best regards,

Randal.
 
lsps -a ===> to check paging space if over 70%
topas is much better then sar for daily check.
 
You can also :

====================
#!/bin/ksh
#Check for applications dumps reasons:
echo “Latest application dumps :\n” >> $LOGFILE
if [[ `oslevel |cut -d. –f 1` = “5” ]] ;then
ERROR1=”AD2BA772”
ERROR2=”B6048838”
else
ERROR1=”C60BB505”
ERROR2=””
fi
DATE1=””
for SEQUENCE in `errpt -a -j $ERROR1,$ERROR2|grep Sequence|cut -d: -f2`;do
DATE2=`errpt -a -l $SEQUENCE|grep Date|awk '{ print $5 }'|cut -d: -f 1,2`
if [[ $DATE1 != $DATE2 ]] ;then
echo “`errpt -l $SEQUENCE -a|grep Date|awk '{ print $3,$4,$5 }'` \c\t” >> $LOGFILE
errpt -a -l $SEQUENCE|awk '/PROGRAM NAME/,/ADDITIONAL INFORMATION/'|grep -vE "PROG|ADD" >> $LOGFILE
DATE1=$DATE2
fi
done
echo “” >> $LOGFILE
=====================
echo “Shows top 10 memory usage by process:\n” >> $LOGFILE
ps auxw | sort -r +3 |head –10 >> $LOGFILE
======================
echo “Shows top 10 CPU usage by process:\n” >> $LOGFILE
echo “USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND” >> $LOGFILE
ps auxw|sort -r +2|head –10|grep –v USER >> $LOGFILE
========================
echo “Shows zombies processes:\n” >> $LOGFILE
ps -auw | grep defunct >> $LOGFILE
=========================
echo “Stations connected over IP :\n” >> $LOGFILE
HOSTNAME=`hostname`
netstat -a|grep –i establ|grep -vE "$HOSTNAME.*$HOSTNAME|localhost|loopback"|awk '{ print $5 }'|grep -v $HOSTNAME|cut –f 1,2,3,4 –d .|sort –u >> $LOGFILE
===========================


"Long live king Moshiach !"
 
Take a look at this FAQ: faq52-2445. I set the script to start at boot, it sleeps for five minutes and checks again. This helps automate monitoring errpt. You might want to combine some of this script's features with levw's script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top