Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:10:28

0001 #! /bin/sh
0002 
0003 WorkDir=/data/dqm/filereg
0004 CMSSW_V=CMSSW_2_2_10
0005 YourEmail=lilopera@cern.ch
0006 
0007 
0008 #export CVS_RSH=ssh
0009 #export CVSROOT=:ext:cmscvs.cern.ch:/cvs_server/repositories/CMSSW
0010 source ~cmssw2/cmsset_default.sh
0011 cd $WorkDir/$CMSSW_V/src
0012 cmsenv
0013 XPYTHONPATH=$PYTHONPATH
0014 source /home/dqm/rpms/slc4_ia32_gcc345/cms/dqmgui/4.6.0/etc/profile.d/env.sh
0015 export PYTHONPATH=$XPYTHONPATH:$PYTHONPATH
0016 
0017 #export TNS_ADMIN=/nfshome0/xiezhen/conddb
0018 
0019 
0020 EXE=$WorkDir/dqmPostProcessing_online.py
0021 RUN_STAT=`ps -ef | grep dqmPostProcessing_online.py | grep -v grep | wc | awk '{print $1}'`
0022 #DOG_STAT=`ps -ef | grep alivecheck_dqmPostProcessing.sh | grep -v grep | wc | awk '{print $1}'`
0023 
0024 #if [ $DOG_STAT -gt 10 ]
0025 #    then echo watchdog for dqmPostProcessing seems to have some trouble at $HOST. | mail $YourEmail
0026 #    exit 0
0027 #fi
0028 
0029 
0030 if [ $RUN_STAT -ne 0 ]
0031 then
0032     echo dqmPostProcessing_online.py is running
0033 else
0034     echo dqmPostProcessing_online.py stopped by unknown reason and restarted now.
0035     LOG=$WorkDir/log/LOG.postprocess.$$
0036     $EXE >& $LOG &
0037     date >> $LOG
0038     echo dqmPostProcessing_online.py stopped by unknown reason and restarted at $HOST. >> $LOG
0039     echo dqmPostProcessing_online.py stopped by unknown reason and restarted now at $HOST. | mail $YourEmail
0040 fi
0041