I need to use a monitoring tool to check for the existence of a handful of processes on an HP UX (11i?) box. The software can log on via SSH and run a script -
STDOut should be in the form of:
[SUCCESS|ERROR|UNCERTAIN]: {explanation} {DATA:<value>}
and I need to check that ALL of these processes are running:
icssvr
entserver
cservr
httpd
cos_bridge
ai_bridge
I have created a file called plist with the processes to be checked - my thoughts are along this line:
for i in `cat plist`
if [ ps -ea | grep $i == ``]
echo "ERROR: Process $i not running DATA: 0"
exit 1
fi
echo "SUCCESS: All processes running DATA: 1"
done
STDOut should be in the form of:
[SUCCESS|ERROR|UNCERTAIN]: {explanation} {DATA:<value>}
and I need to check that ALL of these processes are running:
icssvr
entserver
cservr
httpd
cos_bridge
ai_bridge
I have created a file called plist with the processes to be checked - my thoughts are along this line:
for i in `cat plist`
if [ ps -ea | grep $i == ``]
echo "ERROR: Process $i not running DATA: 0"
exit 1
fi
echo "SUCCESS: All processes running DATA: 1"
done