Running a shell script method script on standard RMA on SLES 10:
#!/usr/bin/ksh
ERROR=0
STR="down"
ps -ef > /var/tmp/process
for i in cron ntpd postfix\/master beremote
do
if [ `grep -c $i /var/tmp/process` -ne 1 ]
then
ERROR=1
STR=$i" "$STR
fi
done
if [ $ERROR -eq 0 ]
then
echo scriptres:OK:All_backgrounds_active
else
echo scriptres:BAD:$STR
fi
Run from a shell, ps -ef returns processes as expected.
From the shell script above, run via RMA, we get the /var/tmp/process output of ps -ef truncated so its only 80 characters wide.
Any ideas?
Shell script method on SLES 10
-
- Posts: 96
- Joined: Thu Jul 19, 2007 4:35 am
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 96
- Joined: Thu Jul 19, 2007 4:35 am