Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:43

0001 #! /bin/sh
0002 
0003 WorkDir=/data/dqm/filereg
0004 YourEmail=lilopera@cern.ch
0005 source /nfshome0/cmssw2/scripts/setup.sh
0006 source /home/dqm/rpms/slc4_ia32_gcc345/cms/dqmgui/4.6.0/etc/profile.d/env.sh
0007 
0008 
0009 EXE=$WorkDir/fileTransfer.py
0010 RUN_STAT=`ps -ef | grep fileTransfer.py | grep -v grep | wc | awk '{print $1}'`
0011 #DOG_STAT=`ps -ef | grep alivecheck_dqmPostProcessing.sh | grep -v grep | wc | awk '{print $1}'`
0012 
0013 #if [ $DOG_STAT -gt 10 ]
0014 #    then echo watchdog for dqmPostProcessing seems to have some trouble at $HOST. | mail $YourEmail
0015 #    exit 0
0016 #fi
0017 
0018 
0019 if [ $RUN_STAT -ne 0 ]
0020 then
0021     echo fileTransfer.py is running
0022 else
0023     echo fileTransfer.py stopped by unknown reason and restarted now.
0024     LOG=$WorkDir/log/LOG.fileTransfer.$$
0025     $EXE >& $LOG &
0026     date >> $LOG
0027     echo dfileTransfer.py stopped by unknown reason and restarted at $HOSTNAME. >> $LOG
0028     echo fileTransfer.py stopped by unknown reason and restarted now at $HOSTNMAE. | mail $YourEmail
0029 fi