d1=`date +%d%m%y` echo "The checklist for the server `hostname`" > checklist_$d1 echo "___________________________________________" >> checklist_$d1 echo "uptime is `uptime|awk '{print $3}'` days" >> checklist_$d1 echo "___________________________________________" >> checklist_$d1 echo "Total swap utilisation is `swapinfo -atm|grep total|awk '{print $5}'`" >>checklist_$d1 echo "CPU utilization is `sar 5 5'`" >>checklist_$d1 echo "___________________________________________" >> checklist_$d1 bdf|awk '{print $5,$6}'|sed 1d|sed s/%// > bdf.out while read line do a=`echo "$line"|cut -d " " -f1` if [ $a -ge 75 ] then echo "bdf output shows $line" >> checklist_$d1 fi done < bdf.out dat=`date|awk '{print $2,$3}'` echo "___________________________________________" >> checklist_$d1 ...skipping... d1=`date +%d%m%y` echo "The checklist for the server `hostname`" > checklist_$d1 echo "___________________________________________" >> checklist_$d1 echo "uptime is `uptime|awk '{print $3}'` days" >> checklist_$d1 echo "___________________________________________" >> checklist_$d1 echo "Total swap utilisation is `swapinfo -atm|grep total|awk '{print $5}'`" >> checklist_$d1 echo "___________________________________________" >> checklist_$d1 #echo "cluster status is `cmviewcl|grep 'pkg'`" >> checklist_$d1 echo "___________________________________________" >> checklist_$d1 bdf|awk '{print $5,$6}'|sed 1d|sed s/%// > bdf.out while read line do a=`echo "$line"|cut -d " " -f1` if [ $a -ge 75 ] then echo "bdf output shows $line" >> checklist_$d1 fi done < bdf.out dat=`date|awk '{print $2,$3}'` echo "___________________________________________" >> checklist_$d1 more /var/adm/syslog/syslog.log|grep '$dat'|grep -v inetd|grep -v ftpd|grep -v telnetd|grep -v su|grep -v sshd >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep cmcld|grep failed >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep cmcld|grep exit >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep cmcld|grep lost >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep exit >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep failed >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep terminated >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep kill >> err more /var/adm/syslog/syslog.log|grep '$dat'|grep lost >> err if [ -s err ] then echo "Pls check the file err for error logs" cat checklist_$d1 err >> checklist_$d1 else echo "No errors found in syslog" >> checklist_$d1 fi echo "___________________________________________" >> checklist_$d1 dat1=`date|awk '{print $1,$2,$3}'` no=`grep -n "$dat1" /var/opt/resmon/log/event.log|grep -e "Event Time"|cut -f1 -d:|wc -l` echo "The no of errors found in event log is $no" >> checklist_$d1 if [ $no -gt 0 ] then pgn=`grep -n "$dat1" /var/opt/resmon/log/event.log|grep -e "Event Time"|cut -f1 -d:|sed '1!d'` pgn1=`expr "$pgn" + 6` pgn2=`expr "$pgn1" + 1` pgn3=`expr "$pgn1" + 2` a=`echo "$pgn"p "$pgn1"p "$pgn2"p "$pgn3"p|tr " " ";"` sed -n `echo $a` /var/opt/resmon/log/event.log >> checklist_$d1 echo "___________________________________________" >> checklist_$d1 fi rm err rm bdf.out