Ignore:
Timestamp:
08/25/06 13:40:49 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
3 edited

Legend:

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

    r7933 r7936  
    3636
    3737echo "" >> $jmscriptlog 2>&1
    38 echo `date`": starting jobmanager" >> $jmscriptlog 2>&1
     38echo "starting jobmanager ("`date`")" >> $jmscriptlog 2>&1
    3939makedir $jmlogpath
    4040makedir $listpath >> $jmscriptlog 2>&1
    4141makedir $lockpath >> $jmscriptlog 2>&1
    4242
     43prev=$max
    4344notcount=0
    4445while (( $notcount < 100 ))
     
    7273      num=`echo "((( $i + 1 ) * 24 ) + ( $hour + 1 ) ) - 24 - 1 " | bc `
    7374      pnoscript=${pnos[$num]}
     75      if [ $prev -eq 0 ]
     76      then
     77         echo " prev=0 => resetting pnoscript [$pnoscript] to max [$max]" >> $jmscriptlog 2>&1
     78         pnoscript=$max
     79      fi
    7480      echo " found $queued jobs in the queue (incl. running jobs) [allowed $totalpno]" >> $jmscriptlog 2>&1
    75       echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs) [allowed $pnoscript]" >> $jmscriptlog 2>&1
    76 #      echo "  => num=$num => pnoscript=$pnoscript (i.e. $pnoscript ${scripts[$i]} allowed)" >> $jmscriptlog 2>&1
     81      echo " found $queuedscript ${scripts[$i]} in the queue (incl. running jobs [$runningscript]) [allowed $pnoscript] - not running: $stillinqueue" >> $jmscriptlog 2>&1
    7782     
    7883      if [ "$queued" -gt "$totalpno" ]
     
    8792
    8893      # check if there's something to do
    89       getstatus
     94      getstatus >> $jmscriptlog 2>&1
     95      echo " $numproc ${scripts[$i]} still do to" >> $jmscriptlog 2>&1
    9096      if [ "$numproc" = "" ]
    9197      then
     98         prev=0
    9299         cont >> $jmscriptlog 2>&1
    93100      fi
    94       if ! [ $numproc -gt 0 ]
    95       then
    96          cont >> $jmscriptlog 2>&1
    97       fi
     101      prev=$max
    98102      if [ $numproc -lt $stillinqueue ]
    99103      then
    100          echo "numproc($numproc) -lt stillinqueue($stillinqueue)" >> $jmscriptlog 2>&1
     104         echo " numproc($numproc) -lt stillinqueue($stillinqueue)" >> $jmscriptlog 2>&1
    101105         cont >> $jmscriptlog 2>&1
    102106      fi
     
    107111      makedir $condordir >> $jmscriptlog 2>&1
    108112     
     113      echo " committing 1 ${scripts[$i]} to condor" >> $jmscriptlog 2>&1
    109114      if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>> $jmerrorlog
    110115      then
     
    114119         sleep $errorsleeptime
    115120      fi
     121      date >> $jmscriptlog 2>&1
    116122      echo "" >> $jmscriptlog 2>&1
    117123   done
  • trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher

    r7922 r7936  
    3838scriptlog=$sllogpath/scriptlauncher`date +%F`.log
    3939
    40 date  >> $scriptlog 2>&1
     40echo `date`": starting $0 $@"  >> $scriptlog 2>&1
    4141
    4242path=`dirname $0`
     
    4444date2=`date +%Y-%m-%d`
    4545condordir=$logpath/condor/$date
    46 makedir $condordir
     46makedir $condordir >> $scriptlog 2>&1
    4747
    4848for i in $@
     
    5252      continue
    5353   fi
    54    echo "launching $i..." >> $scriptlog 2>&1
     54   echo " launching $i..." >> $scriptlog 2>&1
    5555   pid=`/usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date2 -a dir=$condordir $path/run.condor | grep cluster | cut -dr -f2`  2>$errorlog
    5656   if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
    5757   then
    58       echo " waiting for $i to be done..." >> $scriptlog 2>&1
     58      echo "  waiting for $i to be done..." >> $scriptlog 2>&1
    5959      /usr/local/bin/condor_wait $condordir/condor-$date2.log $pid >/dev/null 2>$errorlog
    6060   fi
    6161done
    6262echo `date`": all done/submitted." >> $scriptlog 2>&1
     63echo "" >> $scriptlog 2>&1
    6364
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7927 r7936  
    3838
    3939webpath=/www/htdocs/datacenter
     40
     41processlogpath=$logpath/run/`date +%Y/%m/%d`
     42processlog=$processlogpath/process`date +%F`.log
    4043
    4144datetime=`date +%F-%H-%M-%S`
     
    105108# defined
    106109
     110function printprocesslog
     111{
     112   makedir $processlogpath
     113   echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "`basename $0`"["$$"] "$@ >> $processlog
     114}
     115   
    107116# function to exit a script properly
    108117function finish()
     
    353362function getstatus()
    354363{
     364   printprocesslog "this is a test"`date`
    355365   numproc=
    356    echo "getting status..."
     366#   echo "getting status..."
    357367   getdbsetup
    358368   column=${scriptscolname[$i]}
Note: See TracChangeset for help on using the changeset viewer.