Ignore:
Timestamp:
08/30/06 12:33:16 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/jobmanager

    r7946 r7959  
    2929#
    3030
    31 
    3231source `dirname $0`/sourcefile
    3332printprocesslog "INFO starting $0"
     
    5453      dayofweek=`date +%u`
    5554      hour=`date +%k`
     55
    5656      source `dirname $0`/sourcefile
    5757      echo "script: ${scripts[$i]}" >> $jmscriptlog 2>&1
    5858#      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
    6167      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
    6374      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
    6581      stillinqueue=`echo $queuedscript - $runningscript | bc `
    6682
     
    85101      then
    86102         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
    92107      fi
    93108
     
    111126      if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $scriptspath/run.condor 2>> $jmerrorlog
    112127      then
    113          date >> $jmerrorlog
    114          nail -s 'condor problem'  $erradrs < $jmerrorlog
     128         echo `date`"ERROR condor_submit failed" >> $jmerrorlog
    115129         echo "condor is not working -> sleeping $errorsleeptime" >> $jmscriptlog 2>&1
    116          printprocesslog "ERROR submitting ${scripts[$i]} to condor failed"
     130         printprocesslog "WARN submitting ${scripts[$i]} to condor failed"
    117131         sleep $errorsleeptime
    118132      fi
Note: See TracChangeset for help on using the changeset viewer.