Index: trunk/DataCheck/Transfer/CheckTransfer.sh
===================================================================
--- trunk/DataCheck/Transfer/CheckTransfer.sh	(revision 17569)
+++ trunk/DataCheck/Transfer/CheckTransfer.sh	(revision 17570)
@@ -6,4 +6,12 @@
 source `dirname $0`/../Sourcefile.sh
 printprocesslog "INFO starting $0"
+
+numchecktransfer=`/usr/sbin/lsof $0 | grep -o -c $0`
+if [ $numchecktransfer -gt 1 ]
+then
+   printprocesslog "INFO "$0" already running -> exit. "
+   echo "INFO "$0" already running -> exit. "
+   finish
+fi
 
 logfile2=$logpath"/transfer/CheckTransfer.log"
@@ -330,15 +338,15 @@
       echo "SUMMARY for "$date
       echo "-----------------------"
-      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) "
+      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) "
       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile
       echo "" >> $logfile 2>&1
       echo "SUMMARY for "$date >> $logfile 2>&1
       echo "-----------------------" >> $logfile 2>&1
-      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
+      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
       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile 2>&1
       echo "" >> $logfile2 2>&1
       echo "SUMMARY for "$date >> $logfile2 2>&1
       echo "-----------------------" >> $logfile2 2>&1
-      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
+      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
       echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile2 2>&1
       #echo "number of files does not yet agree in all sites ("$result1") -> do no further checking. "
@@ -537,8 +545,10 @@
       do 
          rawfile=$date2"_"`printf %03d $run`".fits"
-         rawfile2=$rawfile".gz"
+         #rawfile2=$rawfile".gz"
+         rawfile2=$rawfile".*z"
          
          # get file sizes for run
-         sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
+         #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
+         sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
          sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
          sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
@@ -621,7 +631,9 @@
       do 
          rawfile=$date2"_"`printf %03d $drsrun`".drs.fits"
-         rawfile2=$rawfile".gz"
+         #rawfile2=$rawfile".gz"
+         rawfile2=$rawfile".*z"
          # get file sizes for run
-         sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
+         #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
+         sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
          sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
          sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
@@ -632,9 +644,9 @@
          if ! [ ${archive[1]} -eq -1 ]
          then
-            sizearchive=( `ls -l $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
+            sizearchive=( `ls -lH $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
          fi
          if ! [ ${fails[1]} -eq -1 ]
          then
-            sizefails=( `ls -l $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
+            sizefails=( `ls -lH $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
          fi
          if ! [ ${wue[1]} -eq -1 ]
@@ -875,4 +887,5 @@
 if [ "$sendemail" = "yes" ]
 then
+   echo ""
    echo "INFO send email with "$logfile2"to shift@fact-project.org "
    printprocesslog "INFO send email with "$logfile2"to shift@fact-project.org "
