Ignore:
Timestamp:
03/01/14 23:41:53 (11 years ago)
Author:
Daniela Dorner
Message:
updated output with qlainfo, implemented fz files, following links in the archive for finding files, added check to allow only one script running
File:
1 edited

Legend:

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

    r17079 r17570  
    66source `dirname $0`/../Sourcefile.sh
    77printprocesslog "INFO starting $0"
     8
     9numchecktransfer=`/usr/sbin/lsof $0 | grep -o -c $0`
     10if [ $numchecktransfer -gt 1 ]
     11then
     12   printprocesslog "INFO "$0" already running -> exit. "
     13   echo "INFO "$0" already running -> exit. "
     14   finish
     15fi
    816
    917logfile2=$logpath"/transfer/CheckTransfer.log"
     
    330338      echo "SUMMARY for "$date
    331339      echo "-----------------------"
    332       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) "
     340      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) "
    333341      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile
    334342      echo "" >> $logfile 2>&1
    335343      echo "SUMMARY for "$date >> $logfile 2>&1
    336344      echo "-----------------------" >> $logfile 2>&1
    337       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) " >> $logfile 2>&1
     345      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
    338346      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile 2>&1
    339347      echo "" >> $logfile2 2>&1
    340348      echo "SUMMARY for "$date >> $logfile2 2>&1
    341349      echo "-----------------------" >> $logfile2 2>&1
    342       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) " >> $logfile2 2>&1
     350      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
    343351      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile2 2>&1
    344352      #echo "number of files does not yet agree in all sites ("$result1") -> do no further checking. "
     
    537545      do
    538546         rawfile=$date2"_"`printf %03d $run`".fits"
    539          rawfile2=$rawfile".gz"
     547         #rawfile2=$rawfile".gz"
     548         rawfile2=$rawfile".*z"
    540549         
    541550         # get file sizes for run
    542          sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
     551         #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
     552         sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
    543553         sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
    544554         sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
     
    621631      do
    622632         rawfile=$date2"_"`printf %03d $drsrun`".drs.fits"
    623          rawfile2=$rawfile".gz"
     633         #rawfile2=$rawfile".gz"
     634         rawfile2=$rawfile".*z"
    624635         # get file sizes for run
    625          sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
     636         #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
     637         sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
    626638         sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
    627639         sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
     
    632644         if ! [ ${archive[1]} -eq -1 ]
    633645         then
    634             sizearchive=( `ls -l $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
     646            sizearchive=( `ls -lH $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
    635647         fi
    636648         if ! [ ${fails[1]} -eq -1 ]
    637649         then
    638             sizefails=( `ls -l $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
     650            sizefails=( `ls -lH $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
    639651         fi
    640652         if ! [ ${wue[1]} -eq -1 ]
     
    875887if [ "$sendemail" = "yes" ]
    876888then
     889   echo ""
    877890   echo "INFO send email with "$logfile2"to shift@fact-project.org "
    878891   printprocesslog "INFO send email with "$logfile2"to shift@fact-project.org "
Note: See TracChangeset for help on using the changeset viewer.