-----------------------Jag preocess---------------------------
bash-3.00# ps -ef | grep -i jag
root 1699 1698 0 08:35:36 ? 0:00 sh -c jagsrv Jaguar -IPV4
root 1700 1699 0 08:35:36 ? 0:26 jagsrv Jaguar -IPV4
root 1697 1692 0 08:35:36 ? 0:00 tee /opt/sybase/EAServer/bin/Jaguarout.log
root 1698 1697 0 08:35:36 ? 0:00 /opt/sybase/EAServer/bin/jagsrvagent Jaguar -IPV4
-----------------------cron entry -----------------------------
bash-3.00# crontab -l
0,5,10,15,20,25,30,35,40,45,50 * * * * /opt/sybase/EAServer/bin/process_auto_restart.sh
--------------------------grep the process------------------------
bash-3.00# more /opt/sybase/EAServer/bin/process_auto_restart.sh
#!/bin/sh
# process_auto_restart.sh - auto restart the jag server process if down
#
# Sam - Fri Jan 22 12:33:47 EST 2010
#
############################################################
myprocess=`/bin/pgrep jagsrvagent`
if [ $? -gt 0 ]
then
#echo "Jaguar is down on SERVER" | /bin/mailx -s "Jagserver down" kamal.bhusal@fcc.gov,david.dugard@fcc.gov < /dev/null
cd /opt/sybase/EAServer/bin
nohup /opt/sybase/EAServer/bin/serverstart.sh -jdk15 &
fi
############################################################
# EOF: process_auto_restart.sh
bash-3.00#
No comments:
Post a Comment