Changeset 7959 for trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
- Timestamp:
- 08/30/06 12:33:16 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
r7946 r7959 29 29 # 30 30 31 32 31 source `dirname $0`/sourcefile 33 32 printprocesslog "INFO starting $0" … … 54 53 dayofweek=`date +%u` 55 54 hour=`date +%k` 55 56 56 source `dirname $0`/sourcefile 57 57 echo "script: ${scripts[$i]}" >> $jmscriptlog 2>&1 58 58 # echo " day: $dayofweek hour: $hour" >> $jmscriptlog 2>&1 59 queued=`/usr/local/bin/condor_q -global -format "%s\n" Owner | grep -c $user` 60 queued=`setzero $queued` 59 60 queued=`/usr/local/bin/condor_q -global -format "%s\n" Owner | grep -c $user` && ! [ $queued -eq 0 ] 61 if [ "$queued" = "" ] 62 then 63 printprocesslog "WARN condor_q failed" 64 echo `date`"ERROR condor_q failed" >> $jmerrorlog 65 cont >> $jmscriptlog 2>&1 66 fi 61 67 queuedscript=`/usr/local/bin/condor_q -global | grep $user | grep -c ${scripts[$i]}` 62 queuedscript=`setzero $queuedscript` 68 if [ "$queuedscript" = "" ] 69 then 70 printprocesslog "WARN condor_q failed" 71 echo `date`"ERROR condor_q failed" >> $jmerrorlog 72 cont >> $jmscriptlog 2>&1 73 fi 63 74 runningscript=`/usr/local/bin/condor_q -global | grep $user | grep ' R ' | grep -c ${scripts[$i]}` 64 runningscript=`setzero $runningscript` 75 if [ "$runningscript" = "" ] 76 then 77 printprocesslog "WARN condor_q failed" 78 echo `date`"ERROR condor_q failed" >> $jmerrorlog 79 cont >> $jmscriptlog 2>&1 80 fi 65 81 stillinqueue=`echo $queuedscript - $runningscript | bc ` 66 82 … … 85 101 then 86 102 cont >> $jmscriptlog 2>&1 87 else 88 if [ "$queuedscript" -gt "$pnoscript" ] 89 then 90 cont >> $jmscriptlog 2>&1 91 fi 103 fi 104 if [ "$queuedscript" -gt "$pnoscript" ] 105 then 106 cont >> $jmscriptlog 2>&1 92 107 fi 93 108 … … 111 126 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $scriptspath/run.condor 2>> $jmerrorlog 112 127 then 113 date >> $jmerrorlog 114 nail -s 'condor problem' $erradrs < $jmerrorlog 128 echo `date`"ERROR condor_submit failed" >> $jmerrorlog 115 129 echo "condor is not working -> sleeping $errorsleeptime" >> $jmscriptlog 2>&1 116 printprocesslog " ERRORsubmitting ${scripts[$i]} to condor failed"130 printprocesslog "WARN submitting ${scripts[$i]} to condor failed" 117 131 sleep $errorsleeptime 118 132 fi
Note:
See TracChangeset
for help on using the changeset viewer.