Checkit

CheckIt Script MAIL_LIST="user@somewhere,user2@somewhwere.com,..." HOSTNAME=`/usr/bin/hostname`
 * 1) !/usr/bin/ksh

/usr/bin/echo "$HOSTNAME machine status for `date`" > /tmp/$HOSTNAME.check_it.txt /usr/bin/uname -a >> /tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[w]=============================================================================" >> /tmp/$HOSTNAME.check_it.txt /usr/bin/w >>/tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[messages]======================================================================" >> /tmp/$HOSTNAME.check_it.txt /usr/bin/tail -100 /var/adm/messages >> /tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[df -k]=========================================================================" >> /tmp/$HOSTNAME.check_it.txt /usr/bin/df -k >> /tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[sar]===========================================================================" >> /tmp/$HOSTNAME.check_it.txt /usr/bin/sar >> /tmp/$HOSTNAME.check_it.txt /usr/bin/sar -f /var/adm/sa/sa`TZ=aaa24 date +%d` >> /tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[mount]=========================================================================" >> /tmp/$HOSTNAME.check_it.txt /sbin/mount -v >> /tmp/$HOSTNAME.check_it.txt

/usr/bin/echo "\n=[ps]============================================================================" >> /tmp/$HOSTNAME.check_it.txt ps -ef >>/tmp/$HOSTNAME.check_it.txt

mailx -s "$HOSTNAME Host status report" $MAIL_LIST < /tmp/$HOSTNAME.check_it.txt