Changeset 18867 for trunk/DataCheck/Transfer
- Timestamp:
- 05/14/17 23:38:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/CheckTransfer.sh
r18851 r18867 18 18 date > $logfile2 2>&1 19 19 20 diskusage=( `ssh fact@161.72.93.13 1 "df -P /daq" | grep daq` )21 # check if more than X GB are left on /daq20 diskusage=( `ssh fact@161.72.93.138 "df -P /data1" | grep data1 ` ) 21 # check if more than X GB are left on newdata /data1 22 22 if [ ${diskusage[3]} -lt 700000 ] 23 23 then 24 printprocesslog "DISK less than 700 GB left on /daq ("${diskusage[3]}")" 25 echo "WARN less than 700 GB left on /daq ("${diskusage[3]}")" 26 echo "WARN less than 700 GB left on /daq ("${diskusage[3]}")" >> $logfile2 2>&1 24 printprocesslog "DISK less than 700 GB left on newdata on /data1 ("${diskusage[3]}")" 25 echo "WARN less than 700 GB left on newdata on /data1 ("${diskusage[3]}")" 26 echo "WARN less than 700 GB left on newdata on /data1 ("${diskusage[3]}")" >> $logfile2 2>&1 27 sendemail="yes" 28 fi 29 diskusage=( `ssh fact@161.72.93.138 "df -P /data2" | grep data2 ` ) 30 # check if more than X GB are left on newdata /data2 31 if [ ${diskusage[3]} -lt 700000 ] 32 then 33 printprocesslog "DISK less than 700 GB left on newdata on /data2 ("${diskusage[3]}")" 34 echo "WARN less than 700 GB left on newdata on /data2 ("${diskusage[3]}")" 35 echo "WARN less than 700 GB left on newdata on /data2 ("${diskusage[3]}")" >> $logfile2 2>&1 27 36 sendemail="yes" 28 37 fi … … 42 51 43 52 # check first the disk in LP and on dl00 44 ssh fact@161.72.93.13 1"df -h /*da*"53 ssh fact@161.72.93.138 "df -h /*da*" 45 54 df -h /scratch 46 55 echo "" … … 83 92 84 93 # get nights from directory in LP 85 dates=( `ssh fact@161.72.93.13 1 "find /loc_data/zipraw -mindepth 3 -type d | sort | sed -e 's/\/loc_data\/zipraw\///g' "` )94 dates=( `ssh fact@161.72.93.138 "find /data2/zipraw -mindepth 3 -type d | sort | sed -e 's/\/data2\/zipraw\///g' "` ) 86 95 87 96 numdaysok=0 … … 146 155 # la palma 147 156 lprawpath="/newdaq/raw/"$date 148 lprawpath2="/daq/raw/"$date 149 # lprawpath2="/newdaq/raw/"$date #if daq is down 150 lpziprawpath="/loc_data/zipraw/"$date 151 qlapath="/daq/analysis/callisto/"$date 152 # qlapath="/newdaq/analysis/callisto/"$date #if daq is down 157 lprawpath2="/data1/raw/"$date 158 lpziprawpath="/data2/zipraw/"$date 159 qlapath="/data1/analysis/callisto/"$date 153 160 # isdc 154 161 localrawpath="/scratch/from_lapalma/raw/"$date 155 162 localrawpath3="/fact/raw/"$date 156 # localfailpath="/archive/fact/fails/raw/"$date157 163 localfailpath="/gpfs/fact/fact-archive/fails/raw/"$date 158 164 # wuerzburg … … 163 169 # get disk usage and number of files for directory 164 170 # on newdaq files with more than 3 digits as run number are excluded 165 newdaq=( `ssh fact@161.72.93.13 1"if [ -d $lprawpath ]; then ls $lprawpath/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $lprawpath; else echo '-1 -1 -1'; fi"` )166 daq=( `ssh fact@161.72.93.13 1"if [ -d $lprawpath2 ]; then ls $lprawpath2/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $lprawpath2; else echo '-1 -1 -1'; fi"` )167 if [ ${newdaq[0]} -eq -1 ] && [ ${daq[0]} -eq -1 ]171 newdaq=( `ssh fact@161.72.93.138 "if [ -d $lprawpath ]; then ls $lprawpath/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $lprawpath; else echo '-1 -1 -1'; fi"` ) 172 daq=( `ssh fact@161.72.93.138 "if [ -d $lprawpath2 ]; then ls $lprawpath2/${date2}_[0-9][0-9][0-9][.]* | wc -l; du -s -b --apparent-size $lprawpath2; else echo '-1 -1 -1'; fi"` ) 173 if [ ${newdaq[0]} -eq -1 ] 168 174 then 169 175 printprocesslog "INFO no data available on newdaq for "$date … … 171 177 continue 172 178 fi 173 zip=( `ssh fact@161.72.93.131 "if [ -d $lpziprawpath ]; then ls $lpziprawpath/${date2}_[0-9][0-9][0-9][.]* 2>/dev/null | wc -l; du -s -b --apparent-size $lpziprawpath; else echo '-1 -1 -1'; fi"` ) 179 if [ ${daq[0]} -eq -1 ] 180 then 181 printprocesslog "INFO no data available on newdata for "$date 182 echo "INFO no data available on newdata for "$date >> $logfile 2>&1 183 continue 184 fi 185 zip=( `ssh fact@161.72.93.138 "if [ -d $lpziprawpath ]; then ls $lpziprawpath/${date2}_[0-9][0-9][0-9][.]* 2>/dev/null | wc -l; du -s -b --apparent-size $lpziprawpath; else echo '-1 -1 -1'; fi"` ) 174 186 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` ) 175 187 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` ) … … 177 189 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"` ) 178 190 #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"` ) 179 qla=( `ssh fact@161.72.93.13 1"ls $qlapath/20*_C.root 2>/dev/null | wc -l"` )191 qla=( `ssh fact@161.72.93.138 "ls $qlapath/20*_C.root 2>/dev/null | wc -l"` ) 180 192 query="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM RunInfo WHERE fNight="$date2 181 193 querystart="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM " … … 225 237 226 238 printprocesslog "disk: " 227 printprocesslog " newdaq "${newdaq[@]}228 printprocesslog " daq"${daq[@]}229 printprocesslog " data"${zip[@]}230 printprocesslog " dl00 "${dl00[@]}231 printprocesslog " wue "${wue[@]}232 printprocesslog " arch "${archive[@]}233 printprocesslog " fail "${fails[@]}239 printprocesslog " newdaq "${newdaq[@]} 240 printprocesslog " newdata "${daq[@]} 241 printprocesslog " newdata zip "${zip[@]} 242 printprocesslog " dl00 "${dl00[@]} 243 printprocesslog " wue "${wue[@]} 244 printprocesslog " arch "${archive[@]} 245 printprocesslog " fail "${fails[@]} 234 246 #printprocesslog " phido "${phido[@]} 235 printprocesslog " qla "${qla[@]}247 printprocesslog " qla "${qla[@]} 236 248 printprocesslog "db: " 237 printprocesslog " runinfo "$numruns238 printprocesslog " rsynced "$numrsynced239 printprocesslog " isdc "$numisdc240 printprocesslog " isdc "$numisdc2" (incl fails folder)"241 printprocesslog " wue "$numwue249 printprocesslog " runinfo "$numruns 250 printprocesslog " rsynced "$numrsynced 251 printprocesslog " isdc "$numisdc 252 printprocesslog " isdc "$numisdc2" (incl fails folder)" 253 printprocesslog " wue "$numwue 242 254 #printprocesslog " phido "$numphido 243 printprocesslog " data "$numdatruns255 printprocesslog " data "$numdatruns 244 256 echo "" >> $logfile 2>&1 245 257 echo "" >> $logfile 2>&1 … … 248 260 echo "" >> $logfile 2>&1 249 261 echo "disk: " >> $logfile 2>&1 250 echo " newdaq "${newdaq[@]} >> $logfile 2>&1251 echo " daq"${daq[@]} >> $logfile 2>&1252 echo " data"${zip[@]} >> $logfile 2>&1253 echo " dl00 "${dl00[@]} >> $logfile 2>&1254 echo " wue "${wue[@]} >> $logfile 2>&1255 echo " arch "${archive[@]} >> $logfile 2>&1256 echo " fail "${fails[@]} >> $logfile 2>&1262 echo " newdaq "${newdaq[@]} >> $logfile 2>&1 263 echo " newdata "${daq[@]} >> $logfile 2>&1 264 echo " newdata zip "${zip[@]} >> $logfile 2>&1 265 echo " dl00 "${dl00[@]} >> $logfile 2>&1 266 echo " wue "${wue[@]} >> $logfile 2>&1 267 echo " arch "${archive[@]} >> $logfile 2>&1 268 echo " fail "${fails[@]} >> $logfile 2>&1 257 269 #echo " phido "${phido[@]} >> $logfile 2>&1 258 echo " qla "${qla[@]} >> $logfile 2>&1270 echo " qla "${qla[@]} >> $logfile 2>&1 259 271 echo "db: " >> $logfile 2>&1 260 echo " runinfo "$numruns >> $logfile 2>&1261 echo " rsynced "$numrsynced >> $logfile 2>&1262 echo " isdc "$numisdc >> $logfile 2>&1263 echo " isdc "$numisdc2" (incl fails folder)" >> $logfile 2>&1264 echo " wue "$numwue >> $logfile 2>&1272 echo " runinfo "$numruns >> $logfile 2>&1 273 echo " rsynced "$numrsynced >> $logfile 2>&1 274 echo " isdc "$numisdc >> $logfile 2>&1 275 echo " isdc "$numisdc2" (incl fails folder)" >> $logfile 2>&1 276 echo " wue "$numwue >> $logfile 2>&1 265 277 #echo " phido "$numphido >> $logfile 2>&1 266 echo " datruns "$numdatruns >> $logfile 2>&1278 echo " datruns "$numdatruns >> $logfile 2>&1 267 279 268 280 if ! [ $numdatruns -eq $qla ] … … 290 302 if ! [ ${daq[0]} -eq -1 ] && ! [ ${daq[0]} -eq ${newdaq[0]} ] 291 303 then 292 printprocesslog "WARN number of files on daq(" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date293 echo "WARN number of files on daq(" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date >> $logfile 2>&1304 printprocesslog "WARN number of files on newdata (" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date 305 echo "WARN number of files on newdata (" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date >> $logfile 2>&1 294 306 numpb=`echo " $numpb + 1 " | bc -l ` 295 307 result1=$result1"1" … … 382 394 echo "SUMMARY for "$date 383 395 echo "-----------------------" 384 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) "396 echo " number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (newdata) "${zip[0]}" (newdata zip) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " 385 397 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile 386 398 # print to single logfile 387 399 echo "SUMMARY for "$date >> $logfile 2>&1 388 400 echo "-----------------------" >> $logfile 2>&1 389 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>&1401 echo " number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (newdata) "${zip[0]}" (newdata zip) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile 2>&1 390 402 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1 391 403 # print to global logfile 392 404 echo "SUMMARY for "$date >> $logfile2 2>&1 393 405 echo "-----------------------" >> $logfile2 2>&1 394 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>&1406 echo " number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (newdata) "${zip[0]}" (newdata zip) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile2 2>&1 395 407 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1 396 408 continue … … 401 413 if ! [ ${newdaq[1]} -eq ${daq[1]} ] 402 414 then 403 printprocesslog "INFO size of data doesn't agree on newdaq ("${newdaq[1]}") and daq("${daq[1]}") for "$date404 echo "WARN size of data doesn't agree on newdaq ("${newdaq[1]}") and daq("${daq[1]}") for "$date >> $logfile 2>&1415 printprocesslog "INFO size of data doesn't agree on newdaq ("${newdaq[1]}") and newdata ("${daq[1]}") for "$date 416 echo "WARN size of data doesn't agree on newdaq ("${newdaq[1]}") and newdata ("${daq[1]}") for "$date >> $logfile 2>&1 405 417 numdiff=`echo " $numdiff + 1 " | bc -l ` 406 418 numpb=`echo " $numpb + 1 " | bc -l ` … … 414 426 if ! [ ${zip[1]} -eq ${dl00[1]} ] && [ $date2 -gt 20120307 ] 415 427 then 416 printprocesslog "INFO size of data doesn't agree on data("${zip[1]}") and dl00 ("${dl00[1]}") for "$date417 echo "WARN size of data doesn't agree on data("${zip[1]}") and dl00 ("${dl00[1]}") for "$date >> $logfile 2>&1428 printprocesslog "INFO size of data doesn't agree on newdata-zip ("${zip[1]}") and dl00 ("${dl00[1]}") for "$date 429 echo "WARN size of data doesn't agree on newdata-zip ("${zip[1]}") and dl00 ("${dl00[1]}") for "$date >> $logfile 2>&1 418 430 if ! [ ${dl00[1]} -eq -1 ] 419 431 then … … 432 444 if ! [ ${zip[1]} -eq ${archive[1]} ] 433 445 then 434 printprocesslog "INFO size of data doesn't agree on data("${zip[1]}") and in archive ("${archive[1]}") for "$date435 echo "WARN size of data doesn't agree on data("${zip[1]}") and in archive ("${archive[1]}") for "$date >> $logfile 2>&1446 printprocesslog "INFO size of data doesn't agree on newdata-zip ("${zip[1]}") and in archive ("${archive[1]}") for "$date 447 echo "WARN size of data doesn't agree on newdata-zip ("${zip[1]}") and in archive ("${archive[1]}") for "$date >> $logfile 2>&1 436 448 if ! [ ${archive[1]} -eq -1 ] 437 449 then … … 450 462 if ! [ ${zip[1]} -eq ${wue[1]} ] 451 463 then 452 printprocesslog "INFO size of data doesn't agree on data("${zip[1]}") and in Wue ("${wue[1]}") for "$date453 echo "WARN size of data doesn't agree on data("${zip[1]}") and in Wue ("${wue[1]}") for "$date >> $logfile 2>&1464 printprocesslog "INFO size of data doesn't agree on newdata-zip ("${zip[1]}") and in Wue ("${wue[1]}") for "$date 465 echo "WARN size of data doesn't agree on newata-zip ("${zip[1]}") and in Wue ("${wue[1]}") for "$date >> $logfile 2>&1 454 466 if ! [ ${wue[1]} -eq -1 ] 455 467 then … … 468 480 #if ! [ ${zip[1]} -eq ${phido[1]} ] 469 481 #then 470 # printprocesslog "WARN size of data doesn't agree on data("${zip[1]}") and on Phido ("${phido[1]}") for "$date471 # echo "WARN size of data doesn't agree on data("${zip[1]}") and on Phido ("${phido[1]}") for "$date >> $logfile 2>&1482 # printprocesslog "WARN size of data doesn't agree on newdata-zip ("${zip[1]}") and on Phido ("${phido[1]}") for "$date 483 # echo "WARN size of data doesn't agree on newdata-zip ("${zip[1]}") and on Phido ("${phido[1]}") for "$date >> $logfile 2>&1 472 484 # if ! [ ${phido[1]} -eq -1 ] 473 485 # then … … 616 628 617 629 # get file sizes for run 618 #sizenewdaq=( `ssh fact@161.72.93.13 1"ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )619 sizenewdaq=( `ssh fact@161.72.93.13 1"ls -lH ${lprawpath}/${rawfile2} 2>/dev/null | awk '{ print \\\$5 }'"` )620 sizedaq=( `ssh fact@161.72.93.13 1"ls -l $lprawpath2/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )621 sizezip=( `ssh fact@161.72.93.13 1"ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )630 #sizenewdaq=( `ssh fact@161.72.93.138 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` ) 631 sizenewdaq=( `ssh fact@161.72.93.138 "ls -lH ${lprawpath}/${rawfile2} 2>/dev/null | awk '{ print \\\$5 }'"` ) 632 sizedaq=( `ssh fact@161.72.93.138 "ls -l $lprawpath2/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` ) 633 sizezip=( `ssh fact@161.72.93.138 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` ) 622 634 if ! [ ${dl00[1]} -eq -1 ] 623 635 then … … 639 651 if [ "$sizenewdaq" = "" ] || [ "$sizedaq" = "" ] || [ "$sizezip" = "" ] || [ "$sizedl00" = "" ] || [ "$sizewue" = "" ] || ([ "$sizefails" = "" ] && [ "$sizearchive" = "" ]) 640 652 then 641 printprocesslog "WARN one or more of the sizes empty: "$sizenewdaq"(newdaq) "$sizedaq"( daq) "$sizezip"(data) "$sizedl00"(dl) "$sizewue"(wue) "$sizefails"(fails) "$sizearchive"(arch) "653 printprocesslog "WARN one or more of the sizes empty: "$sizenewdaq"(newdaq) "$sizedaq"(newdata) "$sizezip"(newdata zip) "$sizedl00"(dl) "$sizewue"(wue) "$sizefails"(fails) "$sizearchive"(arch) " 642 654 continue 643 655 fi … … 651 663 if ! [ "$sizenewdaq" = "$sizedaq" ] 652 664 then 653 printprocesslog "WARN "$rawfile2" newdaq("$sizenewdaq") daq("$sizedaq")"654 echo " "$rawfile2" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1665 printprocesslog "WARN "$rawfile2" newdaq("$sizenewdaq") newdata("$sizedaq")" 666 echo " "$rawfile2" newdaq("$sizenewdaq") newdata("$sizedaq")" >> $logfile 2>&1 655 667 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l ` 656 668 else … … 660 672 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ] 661 673 then 662 printprocesslog "WARN "$rawfile2" data("$sizezip") dl00("$sizedl00")"663 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1674 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") dl00("$sizedl00")" 675 echo " "$rawfile2" newdata-zip("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1 664 676 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l ` 665 677 else … … 671 683 if [ ${archive[1]} -ne -1 -a "$sizezip" != "$sizearchive" -a "$sizezip" != "$sizefails" ] 672 684 then 673 printprocesslog "WARN "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")"674 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1685 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") archive("$sizearchive"/"$sizefails")" 686 echo " "$rawfile2" newdata-zip("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1 675 687 #echo " "$sizezip"-"$sizearchive"-"${archive[1]}"-"$sizezip"-"$sizefails"-"${fails[1]} 676 688 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` … … 681 693 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ] 682 694 then 683 printprocesslog "WARN "$rawfile2" data("$sizezip") wue("$sizewue")"684 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1695 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") wue("$sizewue")" 696 echo " "$rawfile2" newdata-zip("$sizezip") wue("$sizewue")" >> $logfile 2>&1 685 697 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l ` 686 698 else … … 690 702 #if ! [ "$sizezip" = "$sizephido" ] && ! [ ${phido[1]} -eq -1 ] 691 703 #then 692 # printprocesslog " "$rawfile2" data("$sizezip") phido("$sizephido")"693 # echo " "$rawfile2" data("$sizezip") phido("$sizephido")" >> $logfile 2>&1704 # printprocesslog " "$rawfile2" newdata-zip("$sizezip") phido("$sizephido")" 705 # echo " "$rawfile2" newdata-zip("$sizezip") phido("$sizephido")" >> $logfile 2>&1 694 706 # phidodiffcounter=`echo " $phidodiffcounter + 1 " | bc -l ` 695 707 #else … … 708 720 rawfile2=$rawfile".*z" 709 721 # get file sizes for run 710 #sizenewdaq=( `ssh fact@161.72.93.13 1"ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )711 sizenewdaq=( `ssh fact@161.72.93.13 1"ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )712 sizedaq=( `ssh fact@161.72.93.13 1"ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )713 sizezip=( `ssh fact@161.72.93.13 1"ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )722 #sizenewdaq=( `ssh fact@161.72.93.138 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` ) 723 sizenewdaq=( `ssh fact@161.72.93.138 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` ) 724 sizedaq=( `ssh fact@161.72.93.138 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` ) 725 sizezip=( `ssh fact@161.72.93.138 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` ) 714 726 if ! [ ${dl00[1]} -eq -1 ] 715 727 then … … 734 746 if [ "$sizenewdaq" = "" ] || [ "$sizedaq" = "" ] || [ "$sizezip" = "" ] || [ "$sizedl00" = "" ] || [ "$sizewue" = "" ] || ([ "$sizefails" = "" ] && [ "$sizearchive" = "" ]) 735 747 then 736 printprocesslog "WARN one or more of the sizes empty: "$sizenewdaq"(newdaq) "$sizedaq"( daq) "$sizezip"(data) "$sizedl00"(dl) "$sizewue"(wue) "$sizefails"(fails) "$sizearchive"(arch) "748 printprocesslog "WARN one or more of the sizes empty: "$sizenewdaq"(newdaq) "$sizedaq"(newdata) "$sizezip"(newdata zip) "$sizedl00"(dl) "$sizewue"(wue) "$sizefails"(fails) "$sizearchive"(arch) " 737 749 continue 738 750 fi … … 742 754 if ! [ "$sizenewdaq" = "$sizedaq" ] 743 755 then 744 printprocesslog "WARN "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")"745 echo " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1756 printprocesslog "WARN "$rawfile" newdaq("$sizenewdaq") newdata("$sizedaq")" 757 echo " "$rawfile" newdaq("$sizenewdaq") newdata("$sizedaq")" >> $logfile 2>&1 746 758 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l ` 747 759 else … … 751 763 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ] 752 764 then 753 printprocesslog "WARN "$rawfile2" data("$sizezip") dl00("$sizedl00")"754 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1765 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") dl00("$sizedl00")" 766 echo " "$rawfile2" newdata-zip("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1 755 767 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l ` 756 768 else … … 760 772 if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 -a "$sizearchive" != "" ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 -a "$sizefails" != "" ] 761 773 then 762 printprocesslog "WARN "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")"763 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1774 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") archive("$sizearchive"/"$sizefails")" 775 echo " "$rawfile2" newdata-zip("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1 764 776 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` 765 777 else … … 769 781 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ] 770 782 then 771 printprocesslog "WARN "$rawfile2" data("$sizezip") wue("$sizewue")"772 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1783 printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") wue("$sizewue")" 784 echo " "$rawfile2" newdata-zip("$sizezip") wue("$sizewue")" >> $logfile 2>&1 773 785 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l ` 774 786 else … … 778 790 #if ! [ "$sizezip" = "$sizephido" ] && ! [ ${phido[1]} -eq -1 ] 779 791 #then 780 # printprocesslog "WARN "$rawfile2" data("$sizezip") phido("$sizephido")"781 # echo " "$rawfile2" data("$sizezip") phido("$sizephido")" >> $logfile 2>&1792 # printprocesslog "WARN "$rawfile2" newdata-zip("$sizezip") phido("$sizephido")" 793 # echo " "$rawfile2" newdata-zip("$sizezip") phido("$sizephido")" >> $logfile 2>&1 782 794 # phidodiffcounter=`echo " $phidodiffcounter + 1 " | bc -l ` 783 795 #else … … 839 851 # numpb=`echo " $numpb + 1 " | bc -l ` 840 852 #fi 841 printprocesslog "INFO "$daqokcounter" files are ok on daq (raw)."853 printprocesslog "INFO "$daqokcounter" files are ok on newdata." 842 854 printprocesslog "INFO "$dl00okcounter" files are ok on dl00." 843 855 printprocesslog "INFO "$wueokcounter" files are ok in Wue." 844 856 printprocesslog "INFO "$archiveokcounter" files are ok in the archive." 845 857 #printprocesslog "INFO "$phidookcounter" files are ok on Phido." 846 echo "INFO "$daqokcounter" files are ok on daq (raw)." >> $logfile 2>&1858 echo "INFO "$daqokcounter" files are ok on newdata." >> $logfile 2>&1 847 859 echo "INFO "$dl00okcounter" files are ok on dl00." >> $logfile 2>&1 848 860 echo "INFO "$wueokcounter" files are ok in Wue." >> $logfile 2>&1 … … 851 863 if [ $daqdiffcounter -gt 0 ] 852 864 then 853 printprocesslog "WARN "$daqdiffcounter" files have a different size on daq (raw)."854 echo "WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1855 else 856 printprocesslog "INFO "$daqdiffcounter" files have a different size on daq (raw)."857 echo "INFO "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1865 printprocesslog "WARN "$daqdiffcounter" files have a different size on newdata." 866 echo "WARN "$daqdiffcounter" files have a different size on newdata." >> $logfile 2>&1 867 else 868 printprocesslog "INFO "$daqdiffcounter" files have a different size on newdata." 869 echo "INFO "$daqdiffcounter" files have a different size on newdata." >> $logfile 2>&1 858 870 fi 859 871 if [ $dl00diffcounter -gt 0 ] … … 957 969 if [ $daqdiffcounter -gt 0 ] 958 970 then 959 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)."960 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1961 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile2 2>&1971 echo " WARN "$daqdiffcounter" files have a different size on newdata." 972 echo " WARN "$daqdiffcounter" files have a different size on newdata." >> $logfile 2>&1 973 echo " WARN "$daqdiffcounter" files have a different size on newdata." >> $logfile2 2>&1 962 974 fi 963 975 if [ $dl00diffcounter -gt 0 ]
Note:
See TracChangeset
for help on using the changeset viewer.