Hello All,
I want to monitor the process status(whether it is running or stop).
How I can do the same through SAM.
Actually I have created one script but its giving same output as "UP" even if the processs is in 'stop' state.
PSB the script:-
#!/bin/sh
SERVICE='topas'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "Statistic: 1"
else
echo "Statistic: 0"
fi
Kindly help me with this.