Ignore:
Timestamp:
08/24/06 12:15:46 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7924 r7927  
    1818#
    1919#
    20 #   Author(s): Daniela Dorner  05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
     20#   Author(s): Daniela Dorner  05/2006 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    2222#   Copyright: MAGIC Software Development, 2000-2006
     
    5656      queuedscript=`/usr/local/bin/condor_q -global | grep $user | grep -c ${scripts[$i]}`
    5757      queuedscript=`setzero $queuedscript`
     58      runningscript=`/usr/local/bin/condor_q -global | grep $user | grep ' R ' | grep -c ${scripts[$i]}`
     59      runningscript=`setzero $runningscript`
     60      stillinqueue=`echo $queuedscript - $runningscript | bc `
    5861
    59       echo "date: "`date`" --- date +%k"`date +%k` >> $jmscriptlog 2>&1
    60       echo "--- hour: $hour --- pnototal(hour): ${pnototal[$hour]} --- totalpno: $totalpno ---" >> $jmscriptlog 2>&1
    6162      totalpno=${pnototal[$hour]}
    62       echo "--- hour: $hour --- pnototal(hour): ${pnototal[$hour]} --- totalpno: $totalpno ---" >> $jmscriptlog 2>&1
    63       echo "date: "`date`" --- date +%k"`date +%k` >> $jmscriptlog 2>&1
    6463     
    6564      #choose array according to the day of the week
     
    7675      if [ "$queued" -gt "$totalpno" ]
    7776      then
    78          contex >> $jmscriptlog 2>&1
     77         cont >> $jmscriptlog 2>&1
    7978      else
    8079         if [ "$queuedscript" -gt "$pnoscript" ]
    8180         then
    82             contex >> $jmscriptlog 2>&1
     81            cont >> $jmscriptlog 2>&1
    8382         fi
    8483      fi
    8584
    86       # get todofile
    87       lockfile=$lockpath/lock-getting-${scripts[$i]}-list.txt
    88       checklock  >> $jmscriptlog 2>&1
    89       singleprocess="yes"
    90       gettodo  >> $jmscriptlog 2>&1
    91       rm -v $lockfile >> $jmscriptlog 2>&1
     85      # check if there's something to do
     86      getstatus
     87      if [ "$numproc" = "" ]
     88      then
     89         cont >> $jmscriptlog 2>&1
     90      fi
     91      if ! [ $numproc -gt 0 ]
     92      then
     93         cont >> $jmscriptlog 2>&1
     94      fi
     95      if [ $numproc -lt $stillinqueue ]
     96      then
     97         echo "numproc($numproc) -lt stillinqueue($stillinqueue)" >> $jmscriptlog 2>&1
     98         cont >> $jmscriptlog 2>&1
     99      fi
    92100
    93101      date=`date +%Y/%m/%d`
Note: See TracChangeset for help on using the changeset viewer.