Changeset 18685


Ignore:
Timestamp:
12/18/16 20:50:56 (8 years ago)
Author:
Daniela Dorner
Message:
improved logging
File:
1 edited

Legend:

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

    r18582 r18685  
    168168   dl00=( `if [ -d $localrawpath ]; then ls $localrawpath/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $localrawpath; else echo '-1 -1 -1'; fi` )
    169169   archive=( `if [ -d $localrawpath3 ]; then ls $localrawpath3/${date2}_[0-9][0-9][0-9][.]* 2>/dev/null | wc -l; du -L -s -b --apparent-size $localrawpath3; else echo '-1 -1 -1'; fi` )
    170    fails=( `if [ -d $localfailpath ]; then ls $localfailpath/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -L -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` )
     170   fails=( `if [ -d $localfailpath ]; then ls $localfailpath/${date2}_[0-9][0-9][0-9][.]* 2>/dev/null | wc -l; du -L -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` )
    171171   wue=( `ssh operator@coma.astro.uni-wuerzburg.de "if [ -d $wuerawpath ]; then ls $wuerawpath/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $wuerawpath; else echo '-1 -1 -1'; fi"` )
    172172   #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"` )
     
    476476      if ! [ $numruns -eq ${newdaq[0]} ]
    477477      then
    478          printprocesslog "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns")"
    479          echo "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns")" >> $logfile 2>&1
     478         printprocesslog "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns") for "$date" [DB]"
     479         echo "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
    480480         numpb=`echo " $numpb + 1 " | bc -l `
    481481         result3="1"
     
    487487      if ! [ $numruns -eq $numrsynced ]
    488488      then
    489          printprocesslog "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns")"
    490          echo "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns")" >> $logfile 2>&1
     489         printprocesslog "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns") for "$date" [DB]"
     490         echo "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
    491491         numpb=`echo " $numpb + 1 " | bc -l `
    492492         result3=$result3"1"
     
    498498      if ! [ $numruns -eq $numisdc ]
    499499      then
    500          printprocesslog "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns")"
    501          echo "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns")" >> $logfile 2>&1
     500         printprocesslog "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns") for "$date" [DB]"
     501         echo "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
    502502         numpb=`echo " $numpb + 1 " | bc -l `
    503503         result3=$result3"1"
     
    509509      if ! [ $numruns -eq $numwue ]
    510510      then
    511          printprocesslog "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns")"
    512          echo "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns")" >> $logfile 2>&1
     511         printprocesslog "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns") for "$date" [DB]"
     512         echo "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns") for "$date" [DB]" >> $logfile 2>&1
    513513         numpb=`echo " $numpb + 1 " | bc -l `
    514514         result3=$result3"1"
     
    958958then
    959959   echo ""
    960    echo "INFO send email with "$logfile2"to shift@fact-project.org "
    961    printprocesslog "INFO send email with "$logfile2"to shift@fact-project.org "
     960   echo "INFO send email with "$logfile2" to shift@fact-project.org "
     961   printprocesslog "INFO send email with "$logfile2" to shift@fact-project.org "
    962962   cat $logfile2 | mail -s "testmail for info on deleting data" shift@fact-project.org
    963963fi
Note: See TracChangeset for help on using the changeset viewer.