Changeset 14192 for trunk


Ignore:
Timestamp:
06/19/12 18:25:45 (12 years ago)
Author:
Daniela Dorner
Message:
bugfix for case file size is the same but file is in fails directory (stayed unnoticed as size in archive was different so far)
File:
1 edited

Legend:

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

    r13864 r14192  
    6666   zip=( `ssh fact@161.72.93.131 "if [ -d $lpziprawpath ]; then ls $lpziprawpath/* | wc -l; du -s -b --apparent-size $lpziprawpath; else echo '-1 -1 -1'; fi"` )
    6767   dl00=( `if [ -d $localrawpath ]; then ls $localrawpath/* | wc -l; du -s -b --apparent-size $localrawpath; else echo '-1 -1 -1'; fi` )
    68    archive=( `if [ -d $localrawpath3 ]; then ls $localrawpath3/* | wc -l; du -s -b --apparent-size $localrawpath3; else echo '-1 -1 -1'; fi` )
    69    fails=( `if [ -d $localfailpath ]; then ls $localfailpath/* | wc -l; du -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` )
     68   archive=( `if [ -d $localrawpath3 ]; then ls $localrawpath3/* | wc -l; du -L -s -b --apparent-size $localrawpath3; else echo '-1 -1 -1'; fi` )
     69   fails=( `if [ -d $localfailpath ]; then ls $localfailpath/* | wc -l; du -L -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` )
    7070   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"` )
    7171   query="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM RunInfo WHERE fNight="$date2
     
    320320         if ! [ ${archive[1]} -eq -1 ]
    321321         then
    322             sizearchive=( `ls -l $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
     322            sizearchive=( `ls -lH $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
    323323         fi
    324324         if ! [ ${fails[1]} -eq -1 ]
    325325         then
    326             sizefails=( `ls -l $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
     326            sizefails=( `ls -lH $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
    327327         fi
    328328         if ! [ ${wue[1]} -eq -1 ]
     
    349349         fi
    350350         # archive
    351          if [  "$sizezip" != "$sizearchive"  -a  ${archive[1]} -ne -1 ] || [  "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 ]
     351         if [  "$sizezip" != "$sizearchive"  -a  ${archive[1]} -ne -1 -a "$sizearchive" != "" ] || [  "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 -a "$sizefails" != "" ]
    352352         then
    353353            echo "  "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")"
     354            echo " "$sizezip"-"$sizearchive"-"${archive[1]}"-"$sizezip"-"$sizefails"-"${fails[1]}
    354355            archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l `
    355356         else
     
    483484   echo " ldaw-ldaw-ldaw-ldaw"
    484485   echo " "$result
    485    sumdatanew=`echo " ( ${data[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l `
    486    sumdata=`echo " $sumdata + $sumdatanew " | bc -l `
    487    echo "checked alread "$sumdata" GB."$sumdatanew" "${data[1]}" "${zip[1]}
     486   sumdatanew=`echo " ( ${data[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l | cut -d. -f1`
     487   sumdata=`echo " $sumdata + $sumdatanew " | bc -l | cut -d. -f1`
     488   echo "checked alread "$sumdata" GB. "$sumdatanew" "${data[1]}" "${zip[1]}
    488489   if [ $numpb -lt 4 ]
    489490   then
Note: See TracChangeset for help on using the changeset viewer.