Changeset 7918 for trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
- Timestamp:
- 08/22/06 23:03:41 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
r7914 r7918 38 38 for (( i=0 ; i < ${#scripts[@]} ; i++ )) 39 39 do 40 date >> $scriptlog 2>&1 41 echo "sleeping $sleeptime..." >> $scriptlog 2>&1 40 makedir $jmlogpath 41 date >> $jmscriptlog 2>&1 42 echo "sleeping $sleeptime..." >> $jmscriptlog 2>&1 42 43 sleep $sleeptime 43 44 dayofweek=`date +%u` 44 45 hour=`date +%k` 45 46 source `dirname $0`/sourcefile 46 echo "script: ${scripts[$i]}" >> $ scriptlog 2>&147 # echo " day: $dayofweek hour: $hour" >> $ scriptlog 2>&147 echo "script: ${scripts[$i]}" >> $jmscriptlog 2>&1 48 # echo " day: $dayofweek hour: $hour" >> $jmscriptlog 2>&1 48 49 queued=`/usr/local/bin/condor_q -global -format "%s\n" Owner | grep -c $user` 49 50 queued=`setzero $queued` … … 59 60 num=`echo "((( $i + 1 ) * 24 ) + ( $hour + 1 ) ) - 24 - 1 " | bc ` 60 61 pnoscript=${pnos[$num]} 61 echo " found $queued jobs in the queue (incl. running jobs) [allowed $pnototal]" >> $ scriptlog 2>&162 echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" >> $ scriptlog 2>&163 # echo " => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" >> $ scriptlog 2>&162 echo " found $queued jobs in the queue (incl. running jobs) [allowed $pnototal]" >> $jmscriptlog 2>&1 63 echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" >> $jmscriptlog 2>&1 64 # echo " => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" >> $jmscriptlog 2>&1 64 65 65 66 if [ "$queued" -gt "$pnototal" ] … … 75 76 # get todofile 76 77 lockfile=$lockpath/lock-getting-${script[$i]}-list.txt 77 checklock >> $ scriptlog 2>&178 checklock >> $jmscriptlog 2>&1 78 79 singleprocess="yes" 79 80 gettodo 80 rm -v $lockfile >> $ scriptlog 2>&181 rm -v $lockfile >> $jmscriptlog 2>&1 81 82 82 83 date=`date +%Y/%m/%d` 83 84 date2=`date +%Y-%m-%d` 84 85 condordir=$logpath/condor/$date 85 makedir $condordir >> $ scriptlog 2>&186 makedir $condordir >> $jmscriptlog 2>&1 86 87 87 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>$ errorlog88 if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>$jmerrorlog 88 89 then 89 date >> $ errorlog90 nail -s 'condor problem' $erradrs < $ errorlog91 echo "condor is not working -> sleeping $errorsleeptime" >> $ scriptlog 2>&190 date >> $jmerrorlog 91 nail -s 'condor problem' $erradrs < $jmerrorlog 92 echo "condor is not working -> sleeping $errorsleeptime" >> $jmscriptlog 2>&1 92 93 sleep $errorsleeptime 93 94 fi 94 echo "" >> $ scriptlog 2>&195 echo "" >> $jmscriptlog 2>&1 95 96 done 96 97 done
Note:
See TracChangeset
for help on using the changeset viewer.