Changeset 7918 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 08/22/06 23:03:41 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 3 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 -
trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
r7914 r7918 30 30 source `dirname $0`/sourcefile 31 31 32 errorlog=$logpath/scriptlauncher/`date +%Y/%m`/error`date +%F`.log 33 scriptslog=$logpath/scriptlauncher/`date +%Y/%m`/jobmanager`date +%F`.log 32 sllogpath=$logpath/scriptlauncher/`date +%Y/%m` 33 makedir $sllogpath 34 errorlog=$sllogpath/error`date +%F`.log 35 scriptslog=$logpath/scriptlauncher`date +%F`.log 34 36 35 37 date >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/setup
r7915 r7918 57 57 #log files (can't be defined in script itself, as script can run longer 58 58 #than one day 59 errorlog=$logpath/jobmanager/`date +%Y/%m`/error`date +%F`.log 60 scriptslog=$logpath/jobmanager/`date +%Y/%m`/jobmanager`date +%F`.log 59 jmlogpath=$logpath/jobmanager/`date +%Y/%m` 60 jmerrorlog=$jmlogpath/error`date +%F`.log 61 jmscriptslog=$jmlogpath/jobmanager`date +%F`.log 61 62 62 63 scripts=( "runcallisto" "runstar" "runganymed" "dodatacheck" )
Note:
See TracChangeset
for help on using the changeset viewer.