Changeset 17079 for trunk/DataCheck/Transfer
- Timestamp:
- 09/05/13 14:25:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Transfer/CheckTransfer.sh
r16678 r17079 85 85 dates=( `ssh fact@161.72.93.131 "find /loc_data/zipraw -mindepth 3 -type d | sort | sed -e 's/\/loc_data\/zipraw\///g' "` ) 86 86 87 dates=( "2013/05/23" )87 #dates=( "2013/08/02" ) 88 88 #short="yes" 89 89 90 90 numdaysok=0 91 numdaysoklimit= 591 numdaysoklimit=10 92 92 sumdata=0 93 93 checklimit=5000 … … 130 130 localfailpath="/gpfs/fact/fact-archive/fails/raw/"$date 131 131 wuerawpath="/fact/raw/"$date 132 qlapath="/daq/analysis/callisto/"$date 132 133 #phidorawpath="/fhgfs/groups/app/fact-construction/raw/"$date 133 134 … … 147 148 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"` ) 148 149 #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"` ) 150 qla=( `ssh fact@161.72.93.131 "ls $qlapath/20*_C.root 2>/dev/null | wc -l"` ) 149 151 query="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM RunInfo WHERE fNight="$date2 150 152 querystart="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM " … … 180 182 # numphido=0 181 183 #fi 184 185 # select number of data runs 186 query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$date2 187 query=$query" AND fRunTypeKey=1" 188 numdatruns=`sendquery` 182 189 183 190 printprocesslog "disk: " … … 190 197 printprocesslog " fail "${fails[@]} 191 198 #printprocesslog " phido "${phido[@]} 199 printprocesslog " qla "${qla[@]} 192 200 printprocesslog "db: " 193 201 printprocesslog " runinfo "$numruns … … 196 204 printprocesslog " wue "$numwue 197 205 #printprocesslog " phido "$numphido 206 printprocesslog " data "$numdatruns 198 207 echo "disk: " >> $logfile 2>&1 199 208 echo " newdaq "${newdaq[@]} >> $logfile 2>&1 … … 205 214 echo " fail "${fails[@]} >> $logfile 2>&1 206 215 #echo " phido "${phido[@]} >> $logfile 2>&1 216 echo " qla "${qla[@]} >> $logfile 2>&1 207 217 echo "db: " >> $logfile 2>&1 208 218 echo " runinfo "$numruns >> $logfile 2>&1 … … 211 221 echo " wue "$numwue >> $logfile 2>&1 212 222 #echo " phido "$numphido >> $logfile 2>&1 213 223 echo " datruns "$numdatruns >> $logfile 2>&1 224 225 if ! [ $numdatruns -eq $qla ] 226 then 227 printprocesslog "WARN not all data runs are processed yet by the QLA for "$date"." 228 echo "WARN not all data runs are processed yet by the QLA for "$date >> $logfile 2>&1 229 result1="1-" 230 else 231 result1="0-" 232 fi 214 233 # check if file are available in the different places 215 234 if [ ${dl00[0]} -eq -1 ] && [ $date2 -lt 20120308 ] … … 231 250 echo "WARN number of files on daq (" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date >> $logfile 2>&1 232 251 numpb=`echo " $numpb + 1 " | bc -l ` 233 result1= "1"252 result1=$result1"1" 234 253 else 235 254 numok=`echo " $numok + 1 " | bc -l ` 236 result1= "0"255 result1=$result1"0" 237 256 fi 238 257 # dl00 … … 304 323 #fi 305 324 306 if [ "$short" = "yes" ] || [ "$result1" != "0 000" ]325 if [ "$short" = "yes" ] || [ "$result1" != "0-0000" ] 307 326 then 308 327 printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking." … … 756 775 printprocesslog "INFO numpb: "$numpb 757 776 printprocesslog "result:" 758 printprocesslog "( #files-dudir-db-filesize)"777 printprocesslog "(qla-#files-dudir-db-filesize)" 759 778 #printprocesslog " ldawp-ldawp-ldawp-ldawp" 760 printprocesslog " ldaw-ldaw-ldaw-ldaw"779 printprocesslog " q-ldaw-ldaw-ldaw-ldaw" 761 780 printprocesslog " "$result1"-"$result2"-"$result3"-"$result4 762 781 echo "INFO day ok: "$numdaysok >> $logfile 2>&1 … … 764 783 echo "INFO numpb: "$numpb >> $logfile 2>&1 765 784 echo "result:" >> $logfile 2>&1 766 echo "( #files-dudir-db-filesize)" >> $logfile 2>&1785 echo "(qla-#files-dudir-db-filesize)" >> $logfile 2>&1 767 786 #echo " ldawp-ldawp-ldawp-ldawp" >> $logfile 2>&1 768 echo " ldaw-ldaw-ldaw-ldaw" >> $logfile 2>&1787 echo " q-ldaw-ldaw-ldaw-ldaw" >> $logfile 2>&1 769 788 echo " "$result1"-"$result2"-"$result3"-"$result4 >> $logfile 2>&1 770 789 sumdatanew=`echo " ( ${daq[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l | cut -d. -f1` … … 776 795 fi 777 796 797 echo "" 778 798 echo "SUMMARY for "$date 779 799 echo "-----------------------" … … 789 809 #echo "arch:"${archive[0]} 790 810 #echo "isdc:"$numisdc 791 if [ "$result1" = "0 000" ] && [ "$result3" = "0000" ] && [ "$result4" = "0000" ]811 if [ "$result1" = "0-0000" ] && [ "$result3" = "0000" ] && [ "$result4" = "0000" ] 792 812 then 793 813 echo " EVERYTHING is ok. "$date" can be deleted. " … … 797 817 echo " Details in the logfile "$logfile >> $logfile 2>&1 798 818 echo " Details in the logfile "$logfile >> $logfile2 2>&1 799 else 800 if [ "$result1" = "0000" ] && [ "$result3" = "0010" ] && [ "$result4" = "0000" ] && [ ${archive[0]} -eq $numisdc ] 819 sendemail="yes" 820 else 821 if [ "$result1" = "0-0000" ] && [ "$result3" = "0010" ] && [ "$result4" = "0000" ] && [ ${archive[0]} -eq $numisdc ] 801 822 then 802 823 echo " "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. " … … 809 830 echo " Details in the logfile "$logfile >> $logfile 2>&1 810 831 echo " Details in the logfile "$logfile >> $logfile2 2>&1 832 sendemail="yes" 811 833 else 812 834 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile … … 841 863 echo " WARN "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1 842 864 echo " WARN "$archivediffcounter" files have a different size in the archive." >> $logfile2 2>&1 865 fi 866 if ! [ $numdatruns -eq $qla ] 867 then 868 echo "WARN not all data runs are processed yet by the QLA. " 869 echo "WARN not all data runs are processed yet by the QLA. " >> $logfile 2>&1 870 echo "WARN not all data runs are processed yet by the QLA. " >> $logfile2 2>&1 843 871 fi 844 872 done
Note:
See TracChangeset
for help on using the changeset viewer.