Changeset 13862
- Timestamp:
- 05/24/12 12:25:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/CheckTransfer.sh
r13580 r13862 24 24 numdaysoklimit=3 25 25 sumdata=0 26 checklimit=2 00026 checklimit=2500 27 27 for date in ${dates[@]} 28 28 do … … 52 52 lpziprawpath="/loc_data/zipraw/"$date 53 53 localrawpath="/scratch/from_lapalma/raw/"$date 54 #localrawpath2="/data00/fact-construction/raw/"$date55 54 localrawpath3="/fact/raw/"$date 56 55 localfailpath="/archive/fact/fails/raw/"$date … … 67 66 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"` ) 68 67 dl00=( `if [ -d $localrawpath ]; then ls $localrawpath/* | wc -l; du -s -b --apparent-size $localrawpath; else echo '-1 -1 -1'; fi` ) 69 #data00=( `if [ -d $localrawpath2 ]; then ls $localrawpath2/* | wc -l; du -s -b --apparent-size $localrawpath2; else echo '-1 -1 -1'; fi` )70 68 archive=( `if [ -d $localrawpath3 ]; then ls $localrawpath3/* | wc -l; du -s -b --apparent-size $localrawpath3; else echo '-1 -1 -1'; fi` ) 71 69 fails=( `if [ -d $localfailpath ]; then ls $localfailpath/* | wc -l; du -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` ) … … 101 99 echo " data "${data[@]} 102 100 echo " zip "${zip[@]} 103 #if [ $date2 -gt 20120307 ] 104 #then 105 echo " dl00 "${dl00[@]} 106 #else 107 # echo " data00 "${data00[@]} 108 #fi 101 echo " dl00 "${dl00[@]} 102 echo " wue "${wue[@]} 109 103 echo " arch "${archive[@]} 110 104 echo " fail "${fails[@]} 111 echo " wue "${wue[@]}105 echo "db: " 112 106 echo " runinfo "$numruns 113 107 echo " rsynced "$numrsynced … … 120 114 echo "INFO data not available on /scratch on dl00 for "$date 121 115 fi 122 #if [ ${data00[0]} -eq -1 ] && [ $date2 -gt 20120307 ]123 #then124 # echo "INFO data not available on /data00 for "$date125 #fi126 116 if [ ${archive[0]} -eq -1 ] 127 117 then … … 174 164 result=$result"0" 175 165 fi 176 ## /data00 (to be removed later)177 #if ! [ ${data00[0]} -eq -1 ] && ! [ ${data00[0]} -eq ${daq[0]} ]178 #then179 # echo "WARN number of files in /data00 (" ${data00[0]}") does not agree with number of files in LP (" ${daq[0]}") for "$date180 #fi181 166 # wue 182 167 if ! [ ${wue[0]} -eq -1 ] && ! [ ${wue[0]} -eq ${daq[0]} ] … … 221 206 result=$result"0" 222 207 fi 223 ## data00 (to be removed later)224 #if ! [ ${zip[1]} -eq ${data00[1]} ] && [ $date2 -lt 20120308 ]225 #then226 # echo "WARN size of data doesn't agree on data ("${zip[1]}") and /data00 ("${data00[1]}") for "$date227 # if ! [ ${data00[1]} -eq -1 ]228 # then229 # numdiff=`echo " $numdiff + 1 " | bc -l `230 # fi231 #fi232 208 # archive 233 209 if ! [ ${zip[1]} -eq ${archive[1]} ] … … 341 317 sizedl00=( `ls -l $localrawpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` ) 342 318 fi 343 #if ! [ ${data00[1]} -eq -1 ]344 #then345 # sizedata00=( `ls -l $localrawpath2/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )346 #fi347 319 if ! [ ${archive[1]} -eq -1 ] 348 320 then … … 375 347 dl00okcounter=`echo " $dl00okcounter + 1 " | bc -l ` 376 348 fi 377 ## data00378 #if ! [ "$sizezip" = "$sizedata00" ] && ! [ ${data00[1]} -eq -1 ]379 #then380 # echo " "$rawfile2" data("$sizezip") data00("$sizedata00")"381 #fi382 349 # archive 383 350 if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 ] 384 #if ! [ "$sizezip" = "$sizearchive" ] && ! [ ${archive[1]} -eq -1 ] 385 then 386 #echo " --"$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 387 #if ! [ "$sizezip" = "$sizefails" ] && ! [ ${fails[1]} -eq -1 ] 388 #then 389 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 390 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` 391 #else 392 # archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l ` 393 #fi 351 then 352 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 353 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` 394 354 else 395 355 archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l ` 396 356 fi 397 #if ! [ "$sizezip" = "" ] && ! [ "$sizearchive" = "" ] && ! [ ${archive[1]} -eq -1 ]398 #then399 # if [ $sizezip -gt $sizearchive ]400 # then401 # echo "ERROR "$rawfile" smaller in archive ("$sizearchive") than on data ("$sizezip")"402 # fi403 #fi404 357 # wue 405 358 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ] … … 426 379 sizedl00=( `ls -l $localrawpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` ) 427 380 fi 428 #if ! [ ${data00[1]} -eq -1 ]429 #then430 # sizedata00=( `ls -l $localrawpath2/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )431 #fi432 381 if ! [ ${archive[1]} -eq -1 ] 433 382 then … … 460 409 dl00okcounter=`echo " $dl00okcounter + 1 " | bc -l ` 461 410 fi 462 ## data00463 #if ! [ "$sizezip" = "$sizedata00" ] && ! [ ${data00[1]} -eq -1 ]464 #then465 # echo " "$rawfile2" data("$sizezip") data00("$sizedata00")"466 #fi467 # archive468 #if [ ! [ "$sizezip" = "$sizearchive" ] && ! [ ${archive[1]} -eq -1 ] ] || [ ! [ "$sizezip" = "$sizefails" ] && ! [ ${fails[1]} -eq -1 ] ]469 411 if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 ] 470 412 then 471 #echo " --"$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 472 #if 473 #then 474 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 475 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` 476 #else 477 # archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l ` 478 #fi 413 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 414 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` 479 415 else 480 416 archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l ` … … 491 427 492 428 result=$result"-" 493 #echo "Wue: ok: "$wueokcounter" diff: "$wuediffcounter494 #echo "Arch: ok: "$archiveokcounter" diff: "$archivediffcounter495 429 # raw files 496 echo "INFO "$dataokcounter" files are ok on data (raw)."497 echo "WARN "$datadiffcounter" files have a different size on data (raw)."498 430 if [ $dataokcounter -eq ${data[0]} ] 499 431 then … … 506 438 # zipped files 507 439 # dl00 440 if [ $dl00okcounter -eq ${dl00[0]} ] 441 then 442 result=$result"0" 443 numok=`echo " $numok + 1 " | bc -l ` 444 else 445 result=$result"1" 446 numpb=`echo " $numpb + 1 " | bc -l ` 447 fi 448 # archive 449 if [ $archiveokcounter -eq ${daq[0]} ] 450 then 451 result=$result"0" 452 numok=`echo " $numok + 1 " | bc -l ` 453 else 454 result=$result"1" 455 numpb=`echo " $numpb + 1 " | bc -l ` 456 fi 457 # wue 458 if [ $wueokcounter -eq ${wue[0]} ] 459 then 460 result=$result"0" 461 numok=`echo " $numok + 1 " | bc -l ` 462 else 463 result=$result"1" 464 numpb=`echo " $numpb + 1 " | bc -l ` 465 fi 466 echo "INFO "$dataokcounter" files are ok on data (raw)." 508 467 echo "INFO "$dl00okcounter" files are ok on dl00." 468 echo "INFO "$wueokcounter" files are ok in Wue." 469 echo "INFO "$archiveokcounter" files are ok in the archive." 470 echo "WARN "$datadiffcounter" files have a different size on data (raw)." 509 471 echo "WARN "$dl00diffcounter" files have a different size on dl00." 510 if [ $dl00okcounter -eq ${dl00[0]} ] 511 then 512 result=$result"0" 513 numok=`echo " $numok + 1 " | bc -l ` 514 else 515 result=$result"1" 516 numpb=`echo " $numpb + 1 " | bc -l ` 517 fi 518 # archive 519 echo "INFO "$archiveokcounter" files are ok in the archive." 472 echo "WARN "$wuediffcounter" files have a different size in Wue." 520 473 echo "WARN "$archivediffcounter" files have a different size in the archive." 521 if [ $archiveokcounter -eq ${daq[0]} ] 522 then 523 result=$result"0" 524 numok=`echo " $numok + 1 " | bc -l ` 525 else 526 result=$result"1" 527 numpb=`echo " $numpb + 1 " | bc -l ` 528 fi 529 # wue 530 echo "INFO "$wueokcounter" files are ok in Wue." 531 echo "WARN "$wuediffcounter" files have a different size in Wue." 532 if [ $wueokcounter -eq ${wue[0]} ] 533 then 534 result=$result"0" 535 numok=`echo " $numok + 1 " | bc -l ` 536 else 537 result=$result"1" 538 numpb=`echo " $numpb + 1 " | bc -l ` 539 fi 540 fi 541 542 # list #drs 474 fi 543 475 544 476 # print summary: … … 553 485 sumdata=`echo " $sumdata + $sumdatanew " | bc -l ` 554 486 echo "checked alread "$sumdata" GB."$sumdatanew" "${data[1]}" "${zip[1]} 555 #if [ $numpb -eq 0 ]556 487 if [ $numpb -lt 4 ] 557 488 then
Note:
See TracChangeset
for help on using the changeset viewer.