Ignore:
Timestamp:
01/08/17 17:21:53 (8 years ago)
Author:
Daniela Dorner
Message:
files in the fails folder are considered now "fine" in the context of transfer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Transfer/CheckTransfer.sh

    r18700 r18723  
    101101   if grep "EVERYTHING" $logfile >/dev/null 2>&1
    102102   then
    103       echo " "$date" has been checked already and is fine. Please check logfile "$logfile
    104       echo " "$date" has been checked already and is fine. Please check logfile "$logfile >> $logfile2 2>&1
     103      if grep "fails" $logfile 2>/dev/null | grep "INFO" >/dev/null 2>&1
     104      then
     105         echo " "$date" has been checked already. Please check logfile "$logfile
     106         echo " "$date" has been checked already. Please check logfile "$logfile >> $logfile2 2>&1
     107      else
     108        echo " "$date" has been checked already and is fine. Please check logfile "$logfile
     109        echo " "$date" has been checked already and is fine. Please check logfile "$logfile >> $logfile2 2>&1
     110      fi
    105111      sendemail="yes"
    106112      continue
     
    176182   queryjoin="LEFT JOIN RunInfo USING(fNight,fRunID) "
    177183   querywhere="WHERE fNight="$date2" AND NOT ISNULL(fStartTime) AND NOT ISNULL(fStopTime) AND ISNULL(fReturnCode)"
     184   querywhere2="WHERE fNight="$date2" AND NOT ISNULL(fStartTime) AND NOT ISNULL(fStopTime) AND (ISNULL(fReturnCode) OR fReturnCode=0)"
    178185   numruns=`sendquery`
    179186   if [ "$numruns" == "" ]
     
    192199   then
    193200      numisdc=0
     201   fi
     202   query=$querystart"RawFileAvailISDCStatus "$queryjoin" "$querywhere2
     203   numisdc2=`sendquery`
     204   if [ "$numisdc2" == "" ]
     205   then
     206      numisdc2=0
    194207   fi
    195208   query=$querystart"RawFileAvailWueStatus "$queryjoin" "$querywhere
     
    225238   printprocesslog "  rsynced "$numrsynced
    226239   printprocesslog "  isdc    "$numisdc
     240   printprocesslog "  isdc    "$numisdc2" (incl fails folder)"
    227241   printprocesslog "  wue     "$numwue
    228242   #printprocesslog "  phido   "$numphido
     
    247261   echo "  rsynced "$numrsynced >> $logfile 2>&1
    248262   echo "  isdc    "$numisdc >> $logfile 2>&1
     263   echo "  isdc    "$numisdc2" (incl fails folder)" >> $logfile 2>&1
    249264   echo "  wue     "$numwue >> $logfile 2>&1
    250265   #echo "  phido   "$numphido >> $logfile 2>&1
     
    500515         printprocesslog "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns") for "$date" [DB]"
    501516         echo "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
    502          numpb=`echo " $numpb + 1 " | bc -l `
    503          result3=$result3"1"
     517         numisdctotal=`echo " $numisdc + $numisdc2 " | bc -l `
     518         if ! [ $numruns -eq $numisdc2 ]
     519         then
     520            printprocesslog "WARN number of ingested files in archive incl fails folder ("$numisdc2") not equal to number of runs ("$numruns") for "$date" [DB]"
     521            echo "WARN number of ingested files in archive incl fails folder ("$numisdc2") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
     522            numpb=`echo " $numpb + 1 " | bc -l `
     523            result3=$result3"1"
     524         else
     525            numok=`echo " $numok + 1 " | bc -l `
     526            result3=$result3"0"
     527         fi
    504528      else
    505529         numok=`echo " $numok + 1 " | bc -l `
     
    540564      printprocesslog "number of files does not yet agree in db ("$result3") -> do no further checking."
    541565      echo "" >> $logfile 2>&1
    542       echo "number of files does not yet agree in all sites ("$result1") -> do no further checking." >> $logfile 2>&1
     566      echo "number of files does not yet agree in db ("$result3") -> do no further checking." >> $logfile 2>&1
    543567      echo "" >> $logfile 2>&1
    544568      # print to console
    545       echo "SUMMARY for "$date
    546       echo "-----------------------"
    547       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) "
     569      echo "SUMMARY for "$date" (DB):"
     570      echo "-----------------------------"
     571      echo "  number of runs does not yet agree in DB: "${newdaq[0]}" (newdaq) "$numruns}" (RunInfo) "$numrsynced" (RsyncedToISDC) "$numisdc" (AvailISDC) "$numwue" (AvailWue) "
    548572      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
    549573      # print to single logfile
    550       echo "SUMMARY for "$date >> $logfile 2>&1
    551       echo "-----------------------" >> $logfile 2>&1
    552       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile 2>&1
     574      echo "SUMMARY for "$date" (DB):" >> $logfile 2>&1
     575      echo "-----------------------------" >> $logfile 2>&1
     576      echo "  number of runs does not yet agree in DB: "${newdaq[0]}" (newdaq) "$numruns}" (RunInfo) "$numrsynced" (RsyncedToISDC) "$numisdc" (AvailISDC) "$numwue" (AvailWue) " >> $logfile 2>&1
    553577      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
    554578      # print to global logfile
    555       echo "SUMMARY for "$date >> $logfile2 2>&1
    556       echo "-----------------------" >> $logfile2 2>&1
    557       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile2 2>&1
     579      echo "SUMMARY for "$date" (DB):" >> $logfile2 2>&1
     580      echo "-----------------------------" >> $logfile2 2>&1
     581      echo "  number of runs does not yet agree in DB: "${newdaq[0]}" (newdaq) "$numruns}" (RunInfo) "$numrsynced" (RsyncedToISDC) "$numisdc" (AvailISDC) "$numwue" (AvailWue) " >> $logfile2 2>&1
    558582      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
    559583      continue
     
    945969   if ! [ $numdatruns -eq $qla ]
    946970   then
    947       echo "WARN not all data runs are processed yet by the QLA. "
    948       echo "WARN not all data runs are processed yet by the QLA. " >> $logfile 2>&1
    949       echo "WARN not all data runs are processed yet by the QLA. " >> $logfile2 2>&1
     971      echo "  WARN not all data runs are processed yet by the QLA. "
     972      echo "  WARN not all data runs are processed yet by the QLA. " >> $logfile 2>&1
     973      echo "  WARN not all data runs are processed yet by the QLA. " >> $logfile2 2>&1
     974   fi
     975   if [ ${fails[0]} -gt 0 ] || [ $numisdc -ne $numisdc2 ]
     976   then
     977      echo "  INFO there is "${fails[0]}" file in the fails folder. Please check. "
     978      echo "  INFO there is "${fails[0]}" file in the fails folder. Please check. " >> $logfile 2>&1
     979      echo "  INFO there is "${fails[0]}" file in the fails folder. Please check. " >> $logfile2 2>&1
    950980   fi
    951981   echo ""
Note: See TracChangeset for help on using the changeset viewer.