Changeset 17616 for trunk/DataCheck/Transfer
- Timestamp:
- 03/16/14 23:47:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/CheckTransfer.sh
r17570 r17616 7 7 printprocesslog "INFO starting $0" 8 8 9 numchecktransfer=`/usr/sbin/lsof $0 | grep -o -c $0` 10 if [ $numchecktransfer -gt 1 ] 11 then 12 printprocesslog "INFO "$0" already running -> exit. " 13 echo "INFO "$0" already running -> exit. " 14 finish 15 fi 9 #numchecktransfer=`/usr/sbin/lsof $0 | grep -o -c $0` 10 #if [ $numchecktransfer -gt 1 ] 11 #then 12 # printprocesslog "INFO "$0" already running -> exit. " 13 # echo "INFO "$0" already running -> exit. " 14 # finish 15 #fi 16 16 17 17 18 logfile2=$logpath"/transfer/CheckTransfer.log" … … 22 23 if [ ${diskusage[3]} -lt 700000 ] 23 24 then 24 printprocesslog " WARNless than 700 GB left on /daq "25 printprocesslog "DISK less than 700 GB left on /daq " 25 26 echo "WARN less than 700 GB left on /daq " 26 27 echo "WARN less than 700 GB left on /daq " >> $logfile2 2>&1 … … 32 33 if [ ${diskusage2[3]} -lt 500000 ] 33 34 then 34 printprocesslog " WARNless than 500 GB left on /scratch "35 printprocesslog "DISK less than 500 GB left on /scratch " 35 36 echo "WARN less than 500 GB left on /scratch " 36 37 echo "WARN less than 500 GB left on /scratch " >> $logfile2 2>&1 … … 83 84 84 85 85 # get last 10 nights (skip current night)86 dates=( `date +%Y/%m/%d --date="-360hour"` `date +%Y/%m/%d --date="-336hour"` `date +%Y/%m/%d --date="-312hour"` \87 `date +%Y/%m/%d --date="-288hour"` `date +%Y/%m/%d --date="-264hour"` `date +%Y/%m/%d --date="-240hour"` \88 `date +%Y/%m/%d --date="-216hour"` `date +%Y/%m/%d --date="-192hour"` `date +%Y/%m/%d --date="-168hour"` \89 `date +%Y/%m/%d --date="-144hour"` `date +%Y/%m/%d --date="-120hour"` `date +%Y/%m/%d --date="-96hour"` \90 `date +%Y/%m/%d --date="-72hour"` `date +%Y/%m/%d --date="-48hour"` `date +%Y/%m/%d --date="-24hour"` \91 )92 86 # get nights from directory in LP 93 87 dates=( `ssh fact@161.72.93.131 "find /loc_data/zipraw -mindepth 3 -type d | sort | sed -e 's/\/loc_data\/zipraw\///g' "` ) 94 95 #dates=( "2013/08/02" )96 #short="yes"97 88 98 89 numdaysok=0 … … 106 97 #echo "" 107 98 #echo "" 108 #echo $date109 99 #echo "" > $logfile 2>&1 110 100 #echo "" >> $logfile 2>&1 111 101 #echo "" >> $logfile 2>&1 112 102 echo $date > $logfile 2>&1 103 echo $date >> $logfile2 2>&1 104 if [ "$certaindate" != "" ] 105 then 106 checkstring=`echo $certaindate | grep -E -o '20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]'` 107 if [ "$checkstring" = "" ] 108 then 109 echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)" 110 finish 111 fi 112 if [ "$certaindate" != "$date" ] 113 then 114 printprocesslog "INFO continue, as certaindate has been set to "$certaindate 115 continue 116 fi 117 fi 113 118 114 119 # some counters … … 331 336 #fi 332 337 333 if [ "$short" = "yes" ] || [ "$result1" != "0-0000" ] 338 if [ "$result1" != "0-0000" ] && [ "$short" != "no" ] 339 then 340 short="yes" 341 fi 342 343 if [ "$short" = "yes" ] 334 344 then 335 345 printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking." … … 547 557 #rawfile2=$rawfile".gz" 548 558 rawfile2=$rawfile".*z" 559 printprocesslog "INFO checking "$rawfile 549 560 550 561 # get file sizes for run … … 578 589 if ! [ "$sizenewdaq" = "$sizedaq" ] 579 590 then 580 printprocesslog " 591 printprocesslog "WARN "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" 581 592 echo " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1 582 593 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l ` … … 587 598 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ] 588 599 then 589 printprocesslog " 600 printprocesslog "WARN "$rawfile2" data("$sizezip") dl00("$sizedl00")" 590 601 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1 591 602 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l ` … … 598 609 if [ ${archive[1]} -ne -1 -a "$sizezip" != "$sizearchive" -a "$sizezip" != "$sizefails" ] 599 610 then 600 printprocesslog " 611 printprocesslog "WARN "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 601 612 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1 602 613 #echo " "$sizezip"-"$sizearchive"-"${archive[1]}"-"$sizezip"-"$sizefails"-"${fails[1]} … … 608 619 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ] 609 620 then 610 printprocesslog " 621 printprocesslog "WARN "$rawfile2" data("$sizezip") wue("$sizewue")" 611 622 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1 612 623 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l ` … … 663 674 if ! [ "$sizenewdaq" = "$sizedaq" ] 664 675 then 665 printprocesslog " 676 printprocesslog "WARN "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" 666 677 echo " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1 667 678 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l ` … … 672 683 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ] 673 684 then 674 printprocesslog " 685 printprocesslog "WARN "$rawfile2" data("$sizezip") dl00("$sizedl00")" 675 686 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1 676 687 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l ` … … 681 692 if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 -a "$sizearchive" != "" ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 -a "$sizefails" != "" ] 682 693 then 683 printprocesslog " 694 printprocesslog "WARN "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" 684 695 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1 685 696 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l ` … … 690 701 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ] 691 702 then 692 printprocesslog " 703 printprocesslog "WARN "$rawfile2" data("$sizezip") wue("$sizewue")" 693 704 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1 694 705 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l ` … … 699 710 #if ! [ "$sizezip" = "$sizephido" ] && ! [ ${phido[1]} -eq -1 ] 700 711 #then 701 # printprocesslog " 712 # printprocesslog "WARN "$rawfile2" data("$sizezip") phido("$sizephido")" 702 713 # echo " "$rawfile2" data("$sizezip") phido("$sizephido")" >> $logfile 2>&1 703 714 # phidodiffcounter=`echo " $phidodiffcounter + 1 " | bc -l ` … … 765 776 printprocesslog "INFO "$archiveokcounter" files are ok in the archive." 766 777 #printprocesslog "INFO "$phidookcounter" files are ok on Phido." 767 printprocesslog "WARN "$daqdiffcounter" files have a different size on daq (raw)."768 printprocesslog "WARN "$dl00diffcounter" files have a different size on dl00."769 printprocesslog "WARN "$wuediffcounter" files have a different size in Wue."770 printprocesslog "WARN "$archivediffcounter" files have a different size in the archive."771 #printprocesslog "WARN "$phidodiffcounter" files have a different size on Phido."772 778 echo "INFO "$daqokcounter" files are ok on daq (raw)." >> $logfile 2>&1 773 779 echo "INFO "$dl00okcounter" files are ok on dl00." >> $logfile 2>&1 … … 775 781 echo "INFO "$archiveokcounter" files are ok in the archive." >> $logfile 2>&1 776 782 #echo "INFO "$phidookcounter" files are ok on Phido." >> $logfile 2>&1 777 echo "WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1 778 echo "WARN "$dl00diffcounter" files have a different size on dl00." >> $logfile 2>&1 779 echo "WARN "$wuediffcounter" files have a different size in Wue." >> $logfile 2>&1 780 echo "WARN "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1 783 if [ $daqdiffcounter -gt 0 ] 784 then 785 printprocesslog "WARN "$daqdiffcounter" files have a different size on daq (raw)." 786 echo "WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1 787 else 788 printprocesslog "INFO "$daqdiffcounter" files have a different size on daq (raw)." 789 echo "INFO "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1 790 fi 791 if [ $dl00diffcounter -gt 0 ] 792 then 793 printprocesslog "WARN "$dl00diffcounter" files have a different size on dl00." 794 echo "WARN "$dl00diffcounter" files have a different size on dl00." >> $logfile 2>&1 795 else 796 printprocesslog "INFO "$dl00diffcounter" files have a different size on dl00." 797 echo "INFO "$dl00diffcounter" files have a different size on dl00." >> $logfile 2>&1 798 fi 799 if [ $wuediffcounter -gt 0 ] 800 then 801 printprocesslog "WARN "$wuediffcounter" files have a different size in Wue." 802 echo "WARN "$wuediffcounter" files have a different size in Wue." >> $logfile 2>&1 803 else 804 printprocesslog "INFO "$wuediffcounter" files have a different size in Wue." 805 echo "INFO "$wuediffcounter" files have a different size in Wue." >> $logfile 2>&1 806 fi 807 if [ $archivediffcounter -gt 0 ] 808 then 809 printprocesslog "WARN "$archivediffcounter" files have a different size in the archive." 810 echo "WARN "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1 811 else 812 printprocesslog "INFO "$archivediffcounter" files have a different size in the archive." 813 echo "INFO "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1 814 fi 815 #printprocesslog "WARN "$phidodiffcounter" files have a different size on Phido." 781 816 #echo "WARN "$phidodiffcounter" files have a different size on Phido." >> $logfile 2>&1 782 817 fi
Note:
See TracChangeset
for help on using the changeset viewer.