Changeset 17889


Ignore:
Timestamp:
05/26/14 16:09:30 (10 years ago)
Author:
Daniela Dorner
Message:
improved logging
File:
1 edited

Legend:

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

    r17618 r17889  
    9292do
    9393   logfile=$logpath"/transfer/CheckTransfer_"`echo $date | sed -e 's/\//-/g'`".log"
     94
     95   echo ""
     96   echo "" >> $logfile2 2>&1
     97   echo "Processing "$date" ..."
     98   echo "Processing "$date" ..." >> $logfile2 2>&1
     99
     100   # avoid that already checked days are checked again
    94101   if grep "EVERYTHING" $logfile >/dev/null
    95102   then
    96       echo $date" has been checked already and is fine."
    97       echo $date" has been checked already and is fine." >> $logfile2 2>&1
     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
     105      sendemail="yes"
    98106      continue
    99107   fi
    100    #echo ""
    101    #echo ""
    102    #echo ""
    103    #echo "" > $logfile 2>&1
    104    #echo "" >> $logfile 2>&1
    105    #echo "" >> $logfile 2>&1
    106    echo "Processing "$date" ..."
    107    echo "Processing "$date" ..." > $logfile 2>&1
    108    echo "Processing "$date" ..." >> $logfile2 2>&1
    109108   if [ "$certaindate" != "" ]
    110109   then
     
    342341   #fi
    343342   
     343   short2=
    344344   if [ "$result1" != "0-0000" ] && [ "$short" != "no" ]
    345345   then
    346       short="yes"
    347    fi
    348    
    349    if [ "$short" = "yes" ]
     346      short2="yes"
     347   fi
     348   
     349   if [ "$short2" = "yes" ]
    350350   then
    351351      printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking."
     352      echo "" >> $logfile 2>&1
    352353      echo "number of files does not yet agree in all sites ("$result1") -> do no further checking." >> $logfile 2>&1
    353       echo ""
     354      echo "" >> $logfile 2>&1
     355      # print to console
    354356      echo "SUMMARY for "$date
    355357      echo "-----------------------"
    356358      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) "
    357       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile
    358       echo ""
     359      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
     360      # print to single logfile
    359361      echo "SUMMARY for "$date >> $logfile 2>&1
    360362      echo "-----------------------" >> $logfile 2>&1
    361363      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
    362       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile 2>&1
    363       echo "" >> $logfile 2>&1
     364      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
     365      # print to global logfile
    364366      echo "SUMMARY for "$date >> $logfile2 2>&1
    365367      echo "-----------------------" >> $logfile2 2>&1
    366368      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
    367       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile2 2>&1
    368       echo "" >> $logfile2 2>&1
    369       #echo "number of files does not yet agree in all sites ("$result1") -> do no further checking. "
    370       #echo "disk: "
    371       #echo "  newdaq  "${newdaq[@]}
    372       #echo "  daq     "${daq[@]}
    373       #echo "  data    "${zip[@]}
    374       #echo "  dl00    "${dl00[@]}
    375       #echo "  wue     "${wue[@]}
    376       #echo "  arch    "${archive[@]}
    377       #echo "  fail    "${fails[@]}
    378       ##echo "  phido   "${phido[@]}
    379       #echo "db: "
    380       #echo "  runinfo "$numruns
    381       #echo "  rsynced "$numrsynced
    382       #echo "  isdc    "$numisdc
    383       #echo "  wue     "$numwue
    384       ##echo "  phido   "$numphido
     369      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
    385370      continue
    386371   fi
    387372   
    388    #result=$result"-"
    389373   # check du for raw files
    390374   # la palma
     
    863847   then
    864848      echo "  EVERYTHING is ok. "$date" can be deleted. "
     849      echo "" >> $logfile 2>&1
    865850      echo "  EVERYTHING is ok. "$date" can be deleted. " >> $logfile 2>&1
    866851      echo "  EVERYTHING is ok. "$date" can be deleted. " >> $logfile2 2>&1
    867852      echo "    Details in the logfile "$logfile
    868       echo "    Details in the logfile "$logfile >> $logfile 2>&1
     853      echo "" >> $logfile 2>&1
    869854      echo "    Details in the logfile "$logfile >> $logfile2 2>&1
    870855      sendemail="yes"
     
    876861         echo "  "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. " >> $logfile2 2>&1
    877862         echo "  TRANSFER is ok. "$date" can be deleted. "
     863         echo "" >> $logfile 2>&1
    878864         echo "  TRANSFER is ok. "$date" can be deleted. " >> $logfile 2>&1
    879865         echo "  TRANSFER is ok. "$date" can be deleted. " >> $logfile2 2>&1
    880866         echo "    Details in the logfile "$logfile
    881          echo "    Details in the logfile "$logfile >> $logfile 2>&1
     867         echo "" >> $logfile 2>&1
    882868         echo "    Details in the logfile "$logfile >> $logfile2 2>&1
    883869         sendemail="yes"
    884870      else
    885871         echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
     872         echo "" >> $logfile 2>&1
    886873         echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
    887874         echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
Note: See TracChangeset for help on using the changeset viewer.