Ignore:
Timestamp:
09/05/13 14:25:27 (11 years ago)
Author:
Daniela Dorner
Message:
added check if QLA finished callisto for all data runs
File:
1 edited

Legend:

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

    r16678 r17079  
    8585dates=( `ssh fact@161.72.93.131 "find /loc_data/zipraw -mindepth 3 -type d | sort | sed -e 's/\/loc_data\/zipraw\///g' "` )
    8686
    87 dates=( "2013/05/23" )
     87#dates=( "2013/08/02" )
    8888#short="yes"
    8989
    9090numdaysok=0
    91 numdaysoklimit=5
     91numdaysoklimit=10
    9292sumdata=0
    9393checklimit=5000
     
    130130   localfailpath="/gpfs/fact/fact-archive/fails/raw/"$date
    131131   wuerawpath="/fact/raw/"$date
     132   qlapath="/daq/analysis/callisto/"$date
    132133   #phidorawpath="/fhgfs/groups/app/fact-construction/raw/"$date
    133134   
     
    147148   wue=( `ssh operator@coma.astro.uni-wuerzburg.de "if [ -d $wuerawpath ]; then ls $wuerawpath/* | wc -l; du -s -b --apparent-size $wuerawpath; else echo '-1 -1 -1'; fi"` )
    148149   #phido=( `ssh -i /home_nfs/isdc/fact_opr/.ssh/id_rsa.fact_opr.phido 129.217.160.201 "if [ -d $phidorawpath ]; then ls $phidorawpath/* | wc -l; du -s -b --apparent-size $phidorawpath; else echo '-1 -1 -1'; fi"` )
     150   qla=( `ssh fact@161.72.93.131 "ls $qlapath/20*_C.root 2>/dev/null | wc -l"` )
    149151   query="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM RunInfo WHERE fNight="$date2
    150152   querystart="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM "
     
    180182   #   numphido=0
    181183   #fi
     184   
     185   # select number of data runs
     186   query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$date2
     187   query=$query" AND fRunTypeKey=1"
     188   numdatruns=`sendquery`
    182189   
    183190   printprocesslog "disk: "
     
    190197   printprocesslog "  fail    "${fails[@]}
    191198   #printprocesslog "  phido   "${phido[@]}
     199   printprocesslog "  qla     "${qla[@]}
    192200   printprocesslog "db: "
    193201   printprocesslog "  runinfo "$numruns
     
    196204   printprocesslog "  wue     "$numwue
    197205   #printprocesslog "  phido   "$numphido
     206   printprocesslog "  data    "$numdatruns
    198207   echo "disk: " >> $logfile 2>&1
    199208   echo "  newdaq  "${newdaq[@]} >> $logfile 2>&1
     
    205214   echo "  fail    "${fails[@]} >> $logfile 2>&1
    206215   #echo "  phido   "${phido[@]} >> $logfile 2>&1
     216   echo "  qla     "${qla[@]} >> $logfile 2>&1
    207217   echo "db: " >> $logfile 2>&1
    208218   echo "  runinfo "$numruns >> $logfile 2>&1
     
    211221   echo "  wue     "$numwue >> $logfile 2>&1
    212222   #echo "  phido   "$numphido >> $logfile 2>&1
    213    
     223   echo "  datruns "$numdatruns >> $logfile 2>&1
     224   
     225   if ! [ $numdatruns -eq $qla ]
     226   then
     227      printprocesslog "WARN not all data runs are processed yet by the QLA for "$date"."
     228      echo "WARN not all data runs are processed yet by the QLA for "$date >> $logfile 2>&1
     229      result1="1-"
     230   else
     231      result1="0-"
     232   fi
    214233   # check if file are available in the different places
    215234   if [ ${dl00[0]} -eq -1 ] && [ $date2 -lt 20120308 ]
     
    231250      echo "WARN number of files on daq (" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date >> $logfile 2>&1
    232251      numpb=`echo " $numpb + 1 " | bc -l `
    233       result1="1"
     252      result1=$result1"1"
    234253   else
    235254      numok=`echo " $numok + 1 " | bc -l `
    236       result1="0"
     255      result1=$result1"0"
    237256   fi
    238257   # dl00
     
    304323   #fi
    305324   
    306    if [ "$short" = "yes" ] || [ "$result1" != "0000" ]
     325   if [ "$short" = "yes" ] || [ "$result1" != "0-0000" ]
    307326   then
    308327      printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking."
     
    756775   printprocesslog "INFO numpb: "$numpb
    757776   printprocesslog "result:"
    758    printprocesslog "(#files-dudir-db-filesize)"
     777   printprocesslog "(qla-#files-dudir-db-filesize)"
    759778   #printprocesslog " ldawp-ldawp-ldawp-ldawp"
    760    printprocesslog " ldaw-ldaw-ldaw-ldaw"
     779   printprocesslog " q-ldaw-ldaw-ldaw-ldaw"
    761780   printprocesslog " "$result1"-"$result2"-"$result3"-"$result4
    762781   echo "INFO day ok: "$numdaysok >> $logfile 2>&1
     
    764783   echo "INFO numpb: "$numpb >> $logfile 2>&1
    765784   echo "result:" >> $logfile 2>&1
    766    echo "(#files-dudir-db-filesize)" >> $logfile 2>&1
     785   echo "(qla-#files-dudir-db-filesize)" >> $logfile 2>&1
    767786   #echo " ldawp-ldawp-ldawp-ldawp" >> $logfile 2>&1
    768    echo " ldaw-ldaw-ldaw-ldaw" >> $logfile 2>&1
     787   echo " q-ldaw-ldaw-ldaw-ldaw" >> $logfile 2>&1
    769788   echo " "$result1"-"$result2"-"$result3"-"$result4 >> $logfile 2>&1
    770789   sumdatanew=`echo " ( ${daq[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l | cut -d. -f1`
     
    776795   fi
    777796
     797   echo ""
    778798   echo "SUMMARY for "$date
    779799   echo "-----------------------"
     
    789809   #echo "arch:"${archive[0]}
    790810   #echo "isdc:"$numisdc
    791    if [ "$result1" = "0000" ] && [ "$result3" = "0000" ] && [ "$result4" = "0000" ]
     811   if [ "$result1" = "0-0000" ] && [ "$result3" = "0000" ] && [ "$result4" = "0000" ]
    792812   then
    793813      echo "  EVERYTHING is ok. "$date" can be deleted. "
     
    797817      echo "    Details in the logfile "$logfile >> $logfile 2>&1
    798818      echo "    Details in the logfile "$logfile >> $logfile2 2>&1
    799    else
    800       if [ "$result1" = "0000" ] && [ "$result3" = "0010" ] && [ "$result4" = "0000" ] && [ ${archive[0]} -eq $numisdc ]
     819      sendemail="yes"
     820   else
     821      if [ "$result1" = "0-0000" ] && [ "$result3" = "0010" ] && [ "$result4" = "0000" ] && [ ${archive[0]} -eq $numisdc ]
    801822      then
    802823         echo "  "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. "
     
    809830         echo "    Details in the logfile "$logfile >> $logfile 2>&1
    810831         echo "    Details in the logfile "$logfile >> $logfile2 2>&1
     832         sendemail="yes"
    811833      else
    812834         echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
     
    841863      echo "  WARN "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1
    842864      echo "  WARN "$archivediffcounter" files have a different size in the archive." >> $logfile2 2>&1
     865   fi
     866   if ! [ $numdatruns -eq $qla ]
     867   then
     868      echo "WARN not all data runs are processed yet by the QLA. "
     869      echo "WARN not all data runs are processed yet by the QLA. " >> $logfile 2>&1
     870      echo "WARN not all data runs are processed yet by the QLA. " >> $logfile2 2>&1
    843871   fi
    844872done
Note: See TracChangeset for help on using the changeset viewer.