#!/bin/sh # My life is easy, I just check for arssockd. Maybe one day I will be part of a greater script. while [ ! -f /tmp/arssockd.monitor.must.die ] do if [[ `ps -ef | grep arssockd | grep -vc grep` = 0 ]] then /usr/lpp/ars/bin/arssockd sleep 20 if [[ `ps -ef | grep arssockd | grep -vc grep` = 0 ]] then echo "ARSSOCKD is not running on ODCOD1, This message requires immediate action!" | /opt/bin/ito_msg_gen critical OnDemand AIX OS fi echo "ARSSOCKD required a restart at `date`" | /opt/bin/ito_msg_gen major OnDemand AIX OS else echo "Arssockd is fine." sleep 10 fi done rm /tmp/arssockd.monitor.must.die