1 #!/bin/sh 2 3 4 #-------------------------------------------------------------------------# 5 # Provided as a tool to be called from 'monitorhasrv' # 6 # This file acts as an example monitor script, for the dummy sample # 7 # service, "cat /dev/zero" # 8 # It could be replaced by "proc.monitor 'cat /dev/zero'", but that # 9 # would not provide an example for a full three-fold service handler # 10 # # 11 # Standard UNIX status: returns 0 on good, non-0 on bad. # 12 #-------------------------------------------------------------------------# 13 14 if [ -x /usr/ucb/ps ] ; then 15 PROCLIST="/usr/ucb/ps aux" 16 else 17 PROCLIST="ps -ef" 18 fi 19 20 21 $PROCLIST | grep 'cat /d[e]v/zero' >/dev/null 22 23 if [ $? -eq 0 ] ; then 24 exit 0 25 fi 26 27 exit 1 28