![]() ![]() |
![]() |
File: [Development] / JSOC / proj / workflow / gatekeeper.restart
(download)
Revision: 1.4, Thu Feb 16 20:34:14 2012 UTC (11 years, 3 months ago) by phil Branch: MAIN CVS Tags: Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2 Changes since 1.3: +30 -6 lines Many changes |
#! /bin/csh -f #source ~phil/.cshrc #source ~phil/.login source $HOME/.cshrc source $HOME/.login setenv WORKFLOW_DATA /home/jsoc/pipeline setenv WORKFLOW_ROOT /home/phil/jsoc/proj/workflow cd $WORKFLOW_DATA # restart gatekeeper and put log in pipeline directory. echo " " echo -n Restart gatekeeper at " " date echo -n "On " hostname rm -f Keep_running set loopcount=0 echo -n Waiting while (-e GATEKEEPERBUSY) sleep 1 echo -n '.' @ loopcount = $loopcount + 1 if ($loopcount > 120) then echo Givup waiting after 2 minutes rm -f GATEKEEPERBUSY endif end echo " " # allow extra time to simulate normal gatekeeper sleep. sleep 10 echo -n "Gatekeeper PID = " gatekeeper.csh >& log set gatekeeper_status = $status if ($gatekeeper_status || -e GATEKEEPERBUSY) then echo -n "XXX gatekeeper failed at " date echo "XXX Status was $gatekeeper_status" rm -f GATEKEEPERBUSY rm -f Keep_running echo "XXX force restart" /home/phil/jsoc/proj/workflow/gatekeeper.restart >> /home/jsoc/pipeline/restart.log & else echo -n Gatekeeper stopped by operator at " " date endif
Karen Tian |
Powered by ViewCVS 0.9.4 |