Changeset 15520


Ignore:
Timestamp:
05/07/13 23:27:38 (11 years ago)
Author:
Daniela Dorner
Message:
removed logging to console to avoid emails from cron
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/QuickLook/Step1.sh

    r15388 r15520  
    4848function rsync_aux_file()
    4949{
    50    if ls $1
     50   if ls $1 >/dev/null 2>&1
    5151   then
    5252      printprocesslog "INFO rsync "$1
    5353      #if ! rsync -av --stats $1 $2
    54       if ! rsync -av $1 $2
     54      #if ! rsync -av $1 $2
     55      if ! rsync -a $1 $2
    5556      then
    5657         printprocesslog "WARN rsync of "$1" failed."
    5758      fi
     59   else
     60      printprocesslog "WARN "$1" missing."
    5861   fi
    5962}
     63
     64diskusage=( `df -P /raid10 | grep raid10 ` )
     65# check if more than 700 GB are left on /loc_data
     66if [ ${diskusage[3]} -lt 800000000 ]
     67then
     68   echo "WARN less than 700 left on /raid10 on node "$HOSTNAME
     69   printprocesslog "WARN less than 700 left on /raid10 on node "$HOSTNAME
     70   df -h /raid10
     71   finish
     72fi
    6073
    6174printprocesslog "INFO get lists of raw files on newdaq and daq"
     
    7386makedir $rawpath
    7487
    75 echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     88#echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    7689printprocesslog "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    7790
     
    7992do
    8093   numdataruns=0
    81    echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     94   #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    8295   printprocesslog "INFO status beginning of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    8396
     
    89102      printprocesslog "processing "$file
    90103      localfile=`echo $file | sed -e 's/newdaq/loc_data/'`
    91       echo "processing "$file" "$localfile
     104      #echo "processing "$file" "$localfile
    92105
    93106      if [ "`echo $file | grep -o drs`" == "drs" ]
     
    115128      if ! ls $localfile >/dev/null 2>&1
    116129      then
    117          if ! rsync -av --stats --progress --bwlimit=$bwlimit $file $localfile
     130         #if ! rsync -av --stats --progress --bwlimit=$bwlimit $file $localfile
     131         if ! rsync -a --bwlimit=$bwlimit $file $localfile
    118132         then
    119133            printprocesslog "ERROR something went wrong with rsync of "$file
     
    196210            #echo "numdata +1"
    197211           
    198             echo "cal: "$callistocount" numdat: "$numdataruns" numcallog: "${#callistofiles[@]}
     212            #echo "cal: "$callistocount" numdat: "$numdataruns" numcallog: "${#callistofiles[@]}
    199213            printprocesslog "INFO running callistos: "$callistocount" #data-runs: "$numdataruns" #callisto-logs: "${#callistofiles[@]}
    200214            # do not overload system in case of a lot of files to be processed
     
    203217            then
    204218               printprocesslog "INFO "$callistocount" RunCallisto.sh are running -> continue"
    205                echo "INFO "$callistocount" RunCallisto.sh are running -> continue"
     219               #echo "INFO "$callistocount" RunCallisto.sh are running -> continue"
    206220               continue
    207221            fi
     
    218232               #`dirname $0`/RunCallisto.sh $sourcekey $seqfile &
    219233               printprocesslog "INFO starting RunCallisto.sh for "$seqfile
    220                echo "INFO starting RunCallisto.sh for "$seqfile
     234               #echo "INFO starting RunCallisto.sh for "$seqfile
    221235               `dirname $0`/RunCallisto.sh $seqfile &
    222236            fi
     
    236250         runrow=$runrow$runnum$runtype$roi"_"
    237251         echo $runrow > $infopath/runrow.txt
    238          if echo $runrow | grep -E '[0-9]{3}drs-pedestal1024_[0-9]{3}drs-gain1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-time1024_[0-9]{3}pedestal300_[0-9]{3}pedestal300_'
     252         if echo $runrow | grep -E '[0-9]{3}drs-pedestal1024_[0-9]{3}drs-gain1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-time1024_[0-9]{3}pedestal300_[0-9]{3}pedestal300_' >/dev/null
    239253         then
    240254            runrow2=`echo $runrow | grep -E -o '[0-9]{3}drs-pedestal1024_[0-9]{3}drs-gain1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-pedestal1024_[0-9]{3}drs-time1024_[0-9]{3}pedestal300_[0-9]{3}pedestal300_'`
     
    265279            drsfile=$run6
    266280         fi
    267          if echo $runrow | grep -E '[0-9]{3}pedestal300_[0-9]{3}light-pulser-ext300_'
     281         if echo $runrow | grep -E '[0-9]{3}pedestal300_[0-9]{3}light-pulser-ext300_' >/dev/null
    268282         then
    269283            echo "" > $infopath/runrow.txt
     
    278292   fileslocal=( `find $rawpath -type f | sort` )
    279293   callistofiles=( `find $anapath/callisto -type f -name $date*-calibration.log | sort` )
    280    echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     294   #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    281295   printprocesslog "INFO status after for-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    282296
     
    287301      printprocesslog "INFO wait 60 seconds."
    288302      sleep 60
    289       echo "sleep 60..."
     303      #echo "sleep 60..."
    290304      printprocesslog "INFO get new file lists for "$datepath
    291305      files=( `find $rawpathnewdaq -type f | sort` )
     
    293307      callistofiles=( `find $anapath/callisto -type f -name $date*-calibration.log | sort` )
    294308   fi
    295    echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
     309   #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    296310   printprocesslog "INFO status after wait end of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #data-runs:"$numdataruns
    297311done
Note: See TracChangeset for help on using the changeset viewer.