source: trunk/DataCheck/Transfer/CheckTransfer.sh@ 17590

Last change on this file since 17590 was 17570, checked in by Daniela Dorner, 11 years ago
updated output with qlainfo, implemented fz files, following links in the archive for finding files, added check to allow only one script running
  • Property svn:executable set to *
File size: 39.3 KB
Line 
1#!/bin/bash
2#
3# This script checks whether data can be deleted
4#
5
6source `dirname $0`/../Sourcefile.sh
7printprocesslog "INFO starting $0"
8
9numchecktransfer=`/usr/sbin/lsof $0 | grep -o -c $0`
10if [ $numchecktransfer -gt 1 ]
11then
12 printprocesslog "INFO "$0" already running -> exit. "
13 echo "INFO "$0" already running -> exit. "
14 finish
15fi
16
17logfile2=$logpath"/transfer/CheckTransfer.log"
18date > $logfile2 2>&1
19
20diskusage=( `ssh fact@161.72.93.131 "df -P /daq" | grep daq ` )
21# check if more than X GB are left on /daq
22if [ ${diskusage[3]} -lt 700000 ]
23then
24 printprocesslog "WARN less than 700 GB left on /daq "
25 echo "WARN less than 700 GB left on /daq "
26 echo "WARN less than 700 GB left on /daq " >> $logfile2 2>&1
27 sendemail="yes"
28fi
29
30diskusage2=( `df -P /scratch | grep scratch ` )
31# check if more than X GB are left on /scratch
32if [ ${diskusage2[3]} -lt 500000 ]
33then
34 printprocesslog "WARN less than 500 GB left on /scratch "
35 echo "WARN less than 500 GB left on /scratch "
36 echo "WARN less than 500 GB left on /scratch " >> $logfile2 2>&1
37 sendemail="yes"
38fi
39
40# needed for transfer to phido
41#source /home_nfs/isdc/fact_opr/myagent.sh
42
43# check first the disk in LP and on dl00
44ssh fact@161.72.93.131 "df -h /*da*"
45df -h /scratch
46echo ""
47echo "" >> $logfile2 2>&1
48
49# check next the DB to know if some transfer processes failed or crashed
50function check_runs_in_db()
51{
52 query="SELECT "$toquery" FROM "$1" "$where
53 #echo $query
54 runs=( `sendquery $query` )
55 if [ ${#runs[@]} -gt 0 ]
56 then
57 #for run in ${runs[@]}
58 #do
59 # echo $run
60 #done
61 sendemail="yes"
62 echo -e "\e[1;31m\x1b[5m ==>\e[00m "$1": "${runs[@]}"\e[1;31m\x1b[5m <==\e[00m "
63 echo "SELECT fNight, fRunId, fStartTime, fStopTime, fReturnCode FROM "$1" "$where";"
64 echo "UPDATE "$1" SET fStartTime=NULL, fStopTime=NULL, fAvailable=NULL, fReturnCode=NULL, fProcessingSiteKey=NULL "$where";"
65 echo -e " ==> "$1": "${runs[@]}" <== " >> $logfile2 2>&1
66 echo "---> Please check the DB and reset the processes if needed. " >> $logfile2 2>&1
67 echo "to check: SELECT fNight, fRunId, fStartTime, fStopTime, fReturnCode FROM "$1" "$where";" >> $logfile2 2>&1
68 echo "to reset: UPDATE "$1" SET fStartTime=NULL, fStopTime=NULL, fAvailable=NULL, fReturnCode=NULL, fProcessingSiteKey=NULL "$where";" >> $logfile2 2>&1
69 fi
70}
71# get information of runs where transfer had a problem
72toquery="fNight, fRunID, fStartTime, fStopTime, fAvailable, fProcessingSiteKey, fReturnCode "
73toquery="CONCAT(fNight, '_', fRunID, '(', fStartTime, '-', fStopTime, ':', fReturnCode, ')') "
74toquery="CONCAT(fNight, '_', fRunID, ':', fReturnCode) "
75toquery="IF (ISNULL(fReturnCode), CONCAT(fNight, '_', fRunID, 'crashed'), CONCAT(fNight, '_', fRunID, 'failed', fReturnCode)) "
76where="WHERE NOT ISNULL(fReturnCode) OR (NOT ISNULL(fStartTime) AND ISNULL(fStopTime)) AND fStartTime < DATE_ADD(Now(), INTERVAL -5 HOUR) "
77check_runs_in_db "RawFileRsyncedISDCStatus"
78check_runs_in_db "RawFileAvailWueStatus"
79# RawFileAvailISDC needs a different treatment
80# as return code 0 means that file is in fails folder in archive
81where="WHERE fReturnCode>0 OR (NOT ISNULL(fStartTime) AND ISNULL(fStopTime)) AND fStartTime < DATE_ADD(Now(), INTERVAL -1 HOUR) "
82check_runs_in_db "RawFileAvailISDCStatus"
83
84
85# get last 10 nights (skip current night)
86dates=( `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# get nights from directory in LP
93dates=( `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
98numdaysok=0
99numdaysoklimit=10
100sumdata=0
101checklimit=5000
102for date in ${dates[@]}
103do
104 logfile=$logpath"/transfer/CheckTransfer_"`echo $date | sed -e 's/\//-/g'`".log"
105 #echo ""
106 #echo ""
107 #echo ""
108 #echo $date
109 #echo "" > $logfile 2>&1
110 #echo "" >> $logfile 2>&1
111 #echo "" >> $logfile 2>&1
112 echo $date > $logfile 2>&1
113
114 # some counters
115 numdiff=0
116 numok=0
117 numpb=0
118
119 # check always only $numdaysoklimit days
120 # and require at least $checklimit GB that have been checked
121 # remark: bc: expr1 < expr2: the result is 1 if expr1 is strictly less than expr2
122 if [ $numdaysok -ge $numdaysoklimit ] && [ $(echo " $sumdata > $checklimit " | bc -l) -eq 1 ]
123 then
124 printprocesslog "INFO more than "$numdaysoklimit" ok and more than "$checklimit" GB checked. "
125 continue
126 fi
127
128 # get paths
129 date2=`echo $date | sed -e 's/\///g'`
130# lprawpath="/daq/raw/"$date
131 lprawpath="/newdaq/raw/"$date
132# lprawpath2="/loc_data/raw/"$date
133 lprawpath2="/daq/raw/"$date
134 lpziprawpath="/loc_data/zipraw/"$date
135 localrawpath="/scratch/from_lapalma/raw/"$date
136 localrawpath3="/fact/raw/"$date
137# localfailpath="/archive/fact/fails/raw/"$date
138 localfailpath="/gpfs/fact/fact-archive/fails/raw/"$date
139 wuerawpath="/fact/raw/"$date
140 qlapath="/daq/analysis/callisto/"$date
141 #phidorawpath="/fhgfs/groups/app/fact-construction/raw/"$date
142
143 # get disk usage and number of files for directory
144 newdaq=( `ssh fact@161.72.93.131 "if [ -d $lprawpath ]; then ls $lprawpath/* | wc -l; du -s -b --apparent-size $lprawpath; else echo '-1 -1 -1'; fi"` )
145 daq=( `ssh fact@161.72.93.131 "if [ -d $lprawpath2 ]; then ls $lprawpath2/* | wc -l; du -s -b --apparent-size $lprawpath2; else echo '-1 -1 -1'; fi"` )
146 if [ ${newdaq[0]} -eq -1 ] && [ ${daq[0]} -eq -1 ]
147 then
148 printprocesslog "INFO no data available on newdaq for "$date
149 echo "INFO no data available on newdaq for "$date >> $logfile 2>&1
150 continue
151 fi
152 zip=( `ssh fact@161.72.93.131 "if [ -d $lpziprawpath ]; then ls $lpziprawpath/* 2>/dev/null | wc -l; du -s -b --apparent-size $lpziprawpath; else echo '-1 -1 -1'; fi"` )
153 dl00=( `if [ -d $localrawpath ]; then ls $localrawpath/* | wc -l; du -s -b --apparent-size $localrawpath; else echo '-1 -1 -1'; fi` )
154 archive=( `if [ -d $localrawpath3 ]; then ls $localrawpath3/* 2>/dev/null | wc -l; du -L -s -b --apparent-size $localrawpath3; else echo '-1 -1 -1'; fi` )
155 fails=( `if [ -d $localfailpath ]; then ls $localfailpath/* | wc -l; du -L -s -b --apparent-size $localfailpath; else echo '-1 -1 -1'; fi` )
156 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"` )
157 #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"` )
158 qla=( `ssh fact@161.72.93.131 "ls $qlapath/20*_C.root 2>/dev/null | wc -l"` )
159 query="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM RunInfo WHERE fNight="$date2
160 querystart="SELECT Sum(if(fHasDrsFile=1,2,1)) FROM "
161 queryjoin="LEFT JOIN RunInfo USING(fNight,fRunID) "
162 querywhere="WHERE fNight="$date2" AND NOT ISNULL(fStartTime) AND NOT ISNULL(fStopTime) AND ISNULL(fReturnCode)"
163 numruns=`sendquery`
164 if [ "$numruns" == "" ]
165 then
166 numruns=0
167 fi
168 query=$querystart"RawFileRsyncedISDCStatus "$queryjoin" "$querywhere
169 numrsynced=`sendquery`
170 if [ "$numrsynced" == "" ]
171 then
172 numrsynced=0
173 fi
174 query=$querystart"RawFileAvailISDCStatus "$queryjoin" "$querywhere
175 numisdc=`sendquery`
176 if [ "$numisdc" == "" ]
177 then
178 numisdc=0
179 fi
180 query=$querystart"RawFileAvailWueStatus "$queryjoin" "$querywhere
181 numwue=`sendquery`
182 if [ "$numwue" == "" ]
183 then
184 numwue=0
185 fi
186 #query=$querystart"RawFileAvailPhidoStatus "$queryjoin" "$querywhere
187 #numphido=`sendquery`
188 #if [ "$numphido" == "" ]
189 #then
190 # numphido=0
191 #fi
192
193 # select number of data runs
194 query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$date2
195 query=$query" AND fRunTypeKey=1"
196 numdatruns=`sendquery`
197
198 printprocesslog "disk: "
199 printprocesslog " newdaq "${newdaq[@]}
200 printprocesslog " daq "${daq[@]}
201 printprocesslog " data "${zip[@]}
202 printprocesslog " dl00 "${dl00[@]}
203 printprocesslog " wue "${wue[@]}
204 printprocesslog " arch "${archive[@]}
205 printprocesslog " fail "${fails[@]}
206 #printprocesslog " phido "${phido[@]}
207 printprocesslog " qla "${qla[@]}
208 printprocesslog "db: "
209 printprocesslog " runinfo "$numruns
210 printprocesslog " rsynced "$numrsynced
211 printprocesslog " isdc "$numisdc
212 printprocesslog " wue "$numwue
213 #printprocesslog " phido "$numphido
214 printprocesslog " data "$numdatruns
215 echo "disk: " >> $logfile 2>&1
216 echo " newdaq "${newdaq[@]} >> $logfile 2>&1
217 echo " daq "${daq[@]} >> $logfile 2>&1
218 echo " data "${zip[@]} >> $logfile 2>&1
219 echo " dl00 "${dl00[@]} >> $logfile 2>&1
220 echo " wue "${wue[@]} >> $logfile 2>&1
221 echo " arch "${archive[@]} >> $logfile 2>&1
222 echo " fail "${fails[@]} >> $logfile 2>&1
223 #echo " phido "${phido[@]} >> $logfile 2>&1
224 echo " qla "${qla[@]} >> $logfile 2>&1
225 echo "db: " >> $logfile 2>&1
226 echo " runinfo "$numruns >> $logfile 2>&1
227 echo " rsynced "$numrsynced >> $logfile 2>&1
228 echo " isdc "$numisdc >> $logfile 2>&1
229 echo " wue "$numwue >> $logfile 2>&1
230 #echo " phido "$numphido >> $logfile 2>&1
231 echo " datruns "$numdatruns >> $logfile 2>&1
232
233 if ! [ $numdatruns -eq $qla ]
234 then
235 printprocesslog "WARN not all data runs are processed yet by the QLA for "$date"."
236 echo "WARN not all data runs are processed yet by the QLA for "$date >> $logfile 2>&1
237 result1="1-"
238 else
239 result1="0-"
240 fi
241 # check if file are available in the different places
242 if [ ${dl00[0]} -eq -1 ] && [ $date2 -lt 20120308 ]
243 then
244 printprocesslog "INFO data not available on /scratch on dl00 for "$date
245 echo "INFO data not available on /scratch on dl00 for "$date >> $logfile 2>&1
246 fi
247 if [ ${archive[0]} -eq -1 ]
248 then
249 printprocesslog "INFO data not in archive for "$date
250 echo "INFO data not in archive for "$date >> $logfile 2>&1
251 fi
252
253 # check if number of files agree in the different places
254 # lp
255 if ! [ ${daq[0]} -eq -1 ] && ! [ ${daq[0]} -eq ${newdaq[0]} ]
256 then
257 printprocesslog "WARN number of files on daq (" ${daq[0]}") does not agree with number of files on newdaq (" ${newdaq[0]}") for "$date
258 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
259 numpb=`echo " $numpb + 1 " | bc -l `
260 result1=$result1"1"
261 else
262 numok=`echo " $numok + 1 " | bc -l `
263 result1=$result1"0"
264 fi
265 # dl00
266 #if ! [ ${dl00[0]} -eq -1 ] && ! [ ${dl00[0]} -eq ${newdaq[0]} ]
267 if ! [ ${dl00[0]} -eq ${newdaq[0]} ]
268 then
269 printprocesslog "WARN number of files on dl00 (" ${dl00[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date
270 echo "WARN number of files on dl00 (" ${dl00[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date >> $logfile 2>&1
271 numpb=`echo " $numpb + 1 " | bc -l `
272 result1=$result1"1"
273 else
274 numok=`echo " $numok + 1 " | bc -l `
275 result1=$result1"0"
276 fi
277 # archive
278 if ! [ ${archive[0]} -eq -1 ] && ! [ ${archive[0]} -eq ${newdaq[0]} ]
279 then
280 printprocesslog "WARN number of files in archive (" ${archive[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date
281 echo "WARN number of files in archive (" ${archive[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date >> $logfile 2>&1
282 #check /archive/rev_1/failed
283 if ! [ ${fails[0]} -eq -1 ]
284 then
285 sum=`echo " ${fails[0]} + ${archive[0]} " | bc -l `
286 if ! [ $sum -eq ${newdaq[0]} ]
287 then
288 printprocesslog "ERROR number of files in whole archive ("$sum") is different from number of files in La Palma ("${newdaq[0]}")."
289 echo "ERROR number of files in whole archive ("$sum") is different from number of files in La Palma ("${newdaq[0]}")." >> $logfile 2>&1
290 numpb=`echo " $numpb + 1 " | bc -l `
291 result1=$result1"1"
292 else
293 numok=`echo " $numok + 1 " | bc -l `
294 result1=$result1"0"
295 fi
296 else
297 result1=$result1"1"
298 fi
299 else
300 if [ ${archive[0]} -eq -1 ]
301 then
302 numpb=`echo " $numpb + 1 " | bc -l `
303 result1=$result1"1"
304 else
305 numok=`echo " $numok + 1 " | bc -l `
306 result1=$result1"0"
307 fi
308 fi
309 # wue
310 #if ! [ ${wue[0]} -eq -1 ] && ! [ ${wue[0]} -eq ${newdaq[0]} ]
311 if ! [ ${wue[0]} -eq ${newdaq[0]} ]
312 then
313 printprocesslog "WARN number of files in Wue (" ${wue[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date
314 echo "WARN number of files in Wue (" ${wue[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date >> $logfile 2>&1
315 numpb=`echo " $numpb + 1 " | bc -l `
316 result1=$result1"1"
317 else
318 numok=`echo " $numok + 1 " | bc -l `
319 result1=$result1"0"
320 fi
321 ## phido
322 #if ! [ ${phido[0]} -eq -1 ] && ! [ ${phido[0]} -eq ${newdaq[0]} ]
323 #then
324 # printprocesslog "WARN number of files on Phido (" ${phido[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date
325 # echo "WARN number of files on Phido (" ${phido[0]}") does not agree with number of files in LP (" ${newdaq[0]}") for "$date >> $logfile 2>&1
326 # numpb=`echo " $numpb + 1 " | bc -l `
327 # result1=$result1"1"
328 #else
329 # numok=`echo " $numok + 1 " | bc -l `
330 # result1=$result1"0"
331 #fi
332
333 if [ "$short" = "yes" ] || [ "$result1" != "0-0000" ]
334 then
335 printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking."
336 echo "number of files does not yet agree in all sites ("$result1") -> do no further checking." >> $logfile 2>&1
337 echo ""
338 echo "SUMMARY for "$date
339 echo "-----------------------"
340 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) "
341 echo " "$date" is not yet transfered completely. For more details, please check the logfile "$logfile
342 echo "" >> $logfile 2>&1
343 echo "SUMMARY for "$date >> $logfile 2>&1
344 echo "-----------------------" >> $logfile 2>&1
345 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
346 echo " "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile 2>&1
347 echo "" >> $logfile2 2>&1
348 echo "SUMMARY for "$date >> $logfile2 2>&1
349 echo "-----------------------" >> $logfile2 2>&1
350 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
351 echo " "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile2 2>&1
352 #echo "number of files does not yet agree in all sites ("$result1") -> do no further checking. "
353 #echo "disk: "
354 #echo " newdaq "${newdaq[@]}
355 #echo " daq "${daq[@]}
356 #echo " data "${zip[@]}
357 #echo " dl00 "${dl00[@]}
358 #echo " wue "${wue[@]}
359 #echo " arch "${archive[@]}
360 #echo " fail "${fails[@]}
361 ##echo " phido "${phido[@]}
362 #echo "db: "
363 #echo " runinfo "$numruns
364 #echo " rsynced "$numrsynced
365 #echo " isdc "$numisdc
366 #echo " wue "$numwue
367 ##echo " phido "$numphido
368 continue
369 fi
370
371 #result=$result"-"
372 # check du for raw files
373 # la palma
374 if ! [ ${newdaq[1]} -eq ${daq[1]} ]
375 then
376 printprocesslog "WARN size of data doesn't agree on newdaq ("${newdaq[1]}") and daq ("${daq[1]}") for "$date
377 echo "WARN size of data doesn't agree on newdaq ("${newdaq[1]}") and daq ("${daq[1]}") for "$date >> $logfile 2>&1
378 numdiff=`echo " $numdiff + 1 " | bc -l `
379 numpb=`echo " $numpb + 1 " | bc -l `
380 result2="1"
381 else
382 numok=`echo " $numok + 1 " | bc -l `
383 result2="0"
384 fi
385 # check du for zipped raw files
386 # dl00
387 if ! [ ${zip[1]} -eq ${dl00[1]} ] && [ $date2 -gt 20120307 ]
388 then
389 printprocesslog "WARN size of data doesn't agree on data ("${zip[1]}") and dl00 ("${dl00[1]}") for "$date
390 echo "WARN size of data doesn't agree on data ("${zip[1]}") and dl00 ("${dl00[1]}") for "$date >> $logfile 2>&1
391 if ! [ ${dl00[1]} -eq -1 ]
392 then
393 numdiff=`echo " $numdiff + 1 " | bc -l `
394 numpb=`echo " $numpb + 1 " | bc -l `
395 result2=$result2"1"
396 else
397 numok=`echo " $numok + 1 " | bc -l `
398 result2=$result2"0"
399 fi
400 else
401 numok=`echo " $numok + 1 " | bc -l `
402 result2=$result2"0"
403 fi
404 # archive
405 if ! [ ${zip[1]} -eq ${archive[1]} ]
406 then
407 printprocesslog "WARN size of data doesn't agree on data ("${zip[1]}") and in archive ("${archive[1]}") for "$date
408 echo "WARN size of data doesn't agree on data ("${zip[1]}") and in archive ("${archive[1]}") for "$date >> $logfile 2>&1
409 if ! [ ${archive[1]} -eq -1 ]
410 then
411 numdiff=`echo " $numdiff + 1 " | bc -l `
412 numpb=`echo " $numpb + 1 " | bc -l `
413 result2=$result2"1"
414 else
415 numok=`echo " $numok + 1 " | bc -l `
416 result2=$result2"0"
417 fi
418 else
419 numok=`echo " $numok + 1 " | bc -l `
420 result2=$result2"0"
421 fi
422 # wue
423 if ! [ ${zip[1]} -eq ${wue[1]} ]
424 then
425 printprocesslog "WARN size of data doesn't agree on data ("${zip[1]}") and in Wue ("${wue[1]}") for "$date
426 echo "WARN size of data doesn't agree on data ("${zip[1]}") and in Wue ("${wue[1]}") for "$date >> $logfile 2>&1
427 if ! [ ${wue[1]} -eq -1 ]
428 then
429 numdiff=`echo " $numdiff + 1 " | bc -l `
430 numpb=`echo " $numpb + 1 " | bc -l `
431 result2=$result2"1"
432 else
433 numok=`echo " $numok + 1 " | bc -l `
434 result2=$result2"0"
435 fi
436 else
437 numok=`echo " $numok + 1 " | bc -l `
438 result2=$result2"0"
439 fi
440 ## phido
441 #if ! [ ${zip[1]} -eq ${phido[1]} ]
442 #then
443 # printprocesslog "WARN size of data doesn't agree on data ("${zip[1]}") and on Phido ("${phido[1]}") for "$date
444 # echo "WARN size of data doesn't agree on data ("${zip[1]}") and on Phido ("${phido[1]}") for "$date >> $logfile 2>&1
445 # if ! [ ${phido[1]} -eq -1 ]
446 # then
447 # numdiff=`echo " $numdiff + 1 " | bc -l `
448 # numpb=`echo " $numpb + 1 " | bc -l `
449 # result2=$result2"1"
450 # else
451 # numok=`echo " $numok + 1 " | bc -l `
452 # result2=$result2"0"
453 # fi
454 #else
455 # numok=`echo " $numok + 1 " | bc -l `
456 # result2=$result2"0"
457 #fi
458 #result=$result"-"
459
460 # check DB (only starting from 8.3.2012) (if-clause to be removed later)
461 if [ $date2 -gt 20120307 ]
462 then
463 # lp
464 if ! [ $numruns -eq ${newdaq[0]} ]
465 then
466 printprocesslog "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns")"
467 echo "WARN number of runs on newdaq ("${newdaq[0]}") not equal to number of runs ("$numruns")" >> $logfile 2>&1
468 numpb=`echo " $numpb + 1 " | bc -l `
469 result3="1"
470 else
471 numok=`echo " $numok + 1 " | bc -l `
472 result3="0"
473 fi
474 # dl00
475 if ! [ $numruns -eq $numrsynced ]
476 then
477 printprocesslog "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns")"
478 echo "WARN number of rsynced runs ("$numrsynced") not equal to number of runs ("$numruns")" >> $logfile 2>&1
479 numpb=`echo " $numpb + 1 " | bc -l `
480 result3=$result3"1"
481 else
482 numok=`echo " $numok + 1 " | bc -l `
483 result3=$result3"0"
484 fi
485 # archive
486 if ! [ $numruns -eq $numisdc ]
487 then
488 printprocesslog "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns")"
489 echo "WARN number of ingested files in archive ("$numisdc") not equal to number of runs ("$numruns")" >> $logfile 2>&1
490 numpb=`echo " $numpb + 1 " | bc -l `
491 result3=$result3"1"
492 else
493 numok=`echo " $numok + 1 " | bc -l `
494 result3=$result3"0"
495 fi
496 # wue
497 if ! [ $numruns -eq $numwue ]
498 then
499 printprocesslog "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns")"
500 echo "WARN number of backuped in Wue ("$numrsynced") not equal to number of runs ("$numruns")" >> $logfile 2>&1
501 numpb=`echo " $numpb + 1 " | bc -l `
502 result3=$result3"1"
503 else
504 numok=`echo " $numok + 1 " | bc -l `
505 result3=$result3"0"
506 fi
507 ## phido
508 #if ! [ $numruns -eq $numphido ]
509 #then
510 # printprocesslog "WARN number of backuped on Phido ("$numrsynced") not equal to number of runs ("$numruns")"
511 # echo "WARN number of backuped on Phido ("$numrsynced") not equal to number of runs ("$numruns")" >> $logfile 2>&1
512 # numpb=`echo " $numpb + 1 " | bc -l `
513 # result3=$result3"1"
514 #else
515 # numok=`echo " $numok + 1 " | bc -l `
516 # result3=$result3"0"
517 #fi
518 fi
519
520 #numdiff=0 # add for debugging so that single file sizes are not checked
521 printprocesslog "numdiff: "$numdiff
522 printprocesslog "INFO numok: "$numok
523 printprocesslog "INFO numpb: "$numpb
524 echo "numdiff: "$numdiff >> $logfile 2>&1
525 echo "INFO numok: "$numok >> $logfile 2>&1
526 echo "INFO numpb: "$numpb >> $logfile 2>&1
527 #if [ $numdiff -gt 0 ]
528 if [ $numdiff -ge 0 ]
529 then
530 query="SELECT fRunID FROM RunInfo WHERE fNight="$date2
531 runs=( `sendquery` )
532 archivediffcounter=0
533 archiveokcounter=0
534 wuediffcounter=0
535 wueokcounter=0
536 #phidodiffcounter=0
537 #phidookcounter=0
538 dl00diffcounter=0
539 dl00okcounter=0
540 daqdiffcounter=0
541 daqokcounter=0
542 printprocesslog "INFO found "${#runs[@]}" rawfiles in DB."
543 echo "INFO found "${#runs[@]}" rawfiles in DB." >> $logfile 2>&1
544 for run in ${runs[@]}
545 do
546 rawfile=$date2"_"`printf %03d $run`".fits"
547 #rawfile2=$rawfile".gz"
548 rawfile2=$rawfile".*z"
549
550 # get file sizes for run
551 #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
552 sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
553 sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
554 sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
555 if ! [ ${dl00[1]} -eq -1 ]
556 then
557 sizedl00=( `ls -l $localrawpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
558 fi
559 if ! [ ${archive[1]} -eq -1 ]
560 then
561 sizearchive=( `ls -lH $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
562 fi
563 if ! [ ${fails[1]} -eq -1 ]
564 then
565 sizefails=( `ls -lH $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
566 fi
567 if ! [ ${wue[1]} -eq -1 ]
568 then
569 sizewue=( `ssh operator@coma.astro.uni-wuerzburg.de "ls -l $wuerawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
570 fi
571 #if ! [ ${phido[1]} -eq -1 ]
572 #then
573 # sizephido=( `ssh -i /home_nfs/isdc/fact_opr/.ssh/id_rsa.fact_opr.phido 129.217.160.201 "ls -l $phidorawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
574 #fi
575
576 # check file sizes for run
577 # lp
578 if ! [ "$sizenewdaq" = "$sizedaq" ]
579 then
580 printprocesslog " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")"
581 echo " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1
582 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l `
583 else
584 daqokcounter=`echo " $daqokcounter + 1 " | bc -l `
585 fi
586 # dl00
587 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ]
588 then
589 printprocesslog " "$rawfile2" data("$sizezip") dl00("$sizedl00")"
590 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1
591 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l `
592 else
593 dl00okcounter=`echo " $dl00okcounter + 1 " | bc -l `
594 fi
595 # archive
596 #if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 -a "$sizearchive" != "" ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 -a "$sizefails" != "" ] #not yet ingested files are treated wrongly
597 #if [ ${archive[1]} -ne -1 ] && [ "$sizezip" != "$sizearchive" -o "$sizezip" != "$sizefails" ]
598 if [ ${archive[1]} -ne -1 -a "$sizezip" != "$sizearchive" -a "$sizezip" != "$sizefails" ]
599 then
600 printprocesslog " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")"
601 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1
602 #echo " "$sizezip"-"$sizearchive"-"${archive[1]}"-"$sizezip"-"$sizefails"-"${fails[1]}
603 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l `
604 else
605 archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l `
606 fi
607 # wue
608 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ]
609 then
610 printprocesslog " "$rawfile2" data("$sizezip") wue("$sizewue")"
611 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1
612 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l `
613 else
614 wueokcounter=`echo " $wueokcounter + 1 " | bc -l `
615 fi
616 ## phido
617 #if ! [ "$sizezip" = "$sizephido" ] && ! [ ${phido[1]} -eq -1 ]
618 #then
619 # printprocesslog " "$rawfile2" data("$sizezip") phido("$sizephido")"
620 # echo " "$rawfile2" data("$sizezip") phido("$sizephido")" >> $logfile 2>&1
621 # phidodiffcounter=`echo " $phidodiffcounter + 1 " | bc -l `
622 #else
623 # phidookcounter=`echo " $phidookcounter + 1 " | bc -l `
624 #fi
625 done
626 query="SELECT fRunID FROM RunInfo WHERE fNight="$date2" AND fHasDrsFile=1"
627 drsruns=( `sendquery` )
628 printprocesslog "INFO found "${#drsruns[@]}" drsfiles in DB."
629 echo "INFO found "${#drsruns[@]}" drsfiles in DB." >> $logfile 2>&1
630 for drsrun in ${drsruns[@]}
631 do
632 rawfile=$date2"_"`printf %03d $drsrun`".drs.fits"
633 #rawfile2=$rawfile".gz"
634 rawfile2=$rawfile".*z"
635 # get file sizes for run
636 #sizenewdaq=( `ssh fact@161.72.93.131 "ls -l ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
637 sizenewdaq=( `ssh fact@161.72.93.131 "ls -lH ${lprawpath}/${rawfile} 2>/dev/null | awk '{ print \\\$5 }'"` )
638 sizedaq=( `ssh fact@161.72.93.131 "ls -l $lprawpath2/$rawfile 2>/dev/null | awk '{ print \\\$5 }'"` )
639 sizezip=( `ssh fact@161.72.93.131 "ls -l $lpziprawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
640 if ! [ ${dl00[1]} -eq -1 ]
641 then
642 sizedl00=( `ls -l $localrawpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
643 fi
644 if ! [ ${archive[1]} -eq -1 ]
645 then
646 sizearchive=( `ls -lH $localrawpath3/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
647 fi
648 if ! [ ${fails[1]} -eq -1 ]
649 then
650 sizefails=( `ls -lH $localfailpath/$rawfile2 2>/dev/null | awk '{ print \$5 }'` )
651 fi
652 if ! [ ${wue[1]} -eq -1 ]
653 then
654 sizewue=( `ssh operator@coma.astro.uni-wuerzburg.de "ls -l $wuerawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
655 fi
656 #if ! [ ${phido[1]} -eq -1 ]
657 #then
658 # sizephido=( `ssh -i /home_nfs/isdc/fact_opr/.ssh/id_rsa.fact_opr.phido 129.217.160.201 "ls -l $phidorawpath/$rawfile2 2>/dev/null | awk '{ print \\\$5 }'"` )
659 #fi
660
661 # check file sizes for run
662 # lp
663 if ! [ "$sizenewdaq" = "$sizedaq" ]
664 then
665 printprocesslog " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")"
666 echo " "$rawfile" newdaq("$sizenewdaq") daq("$sizedaq")" >> $logfile 2>&1
667 daqdiffcounter=`echo " $daqdiffcounter + 1 " | bc -l `
668 else
669 daqokcounter=`echo " $daqokcounter + 1 " | bc -l `
670 fi
671 # dl00
672 if ! [ "$sizezip" = "$sizedl00" ] && ! [ ${dl00[1]} -eq -1 ]
673 then
674 printprocesslog " "$rawfile2" data("$sizezip") dl00("$sizedl00")"
675 echo " "$rawfile2" data("$sizezip") dl00("$sizedl00")" >> $logfile 2>&1
676 dl00diffcounter=`echo " $dl00diffcounter + 1 " | bc -l `
677 else
678 dl00okcounter=`echo " $dl00okcounter + 1 " | bc -l `
679 fi
680 #if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 ]
681 if [ "$sizezip" != "$sizearchive" -a ${archive[1]} -ne -1 -a "$sizearchive" != "" ] || [ "$sizezip" != "$sizefails" -a ${fails[1]} -ne -1 -a "$sizefails" != "" ]
682 then
683 printprocesslog " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")"
684 echo " "$rawfile2" data("$sizezip") archive("$sizearchive"/"$sizefails")" >> $logfile 2>&1
685 archivediffcounter=`echo " $archivediffcounter + 1 " | bc -l `
686 else
687 archiveokcounter=`echo " $archiveokcounter + 1 " | bc -l `
688 fi
689 # wue
690 if ! [ "$sizezip" = "$sizewue" ] && ! [ ${wue[1]} -eq -1 ]
691 then
692 printprocesslog " "$rawfile2" data("$sizezip") wue("$sizewue")"
693 echo " "$rawfile2" data("$sizezip") wue("$sizewue")" >> $logfile 2>&1
694 wuediffcounter=`echo " $wuediffcounter + 1 " | bc -l `
695 else
696 wueokcounter=`echo " $wueokcounter + 1 " | bc -l `
697 fi
698 ## phido
699 #if ! [ "$sizezip" = "$sizephido" ] && ! [ ${phido[1]} -eq -1 ]
700 #then
701 # printprocesslog " "$rawfile2" data("$sizezip") phido("$sizephido")"
702 # echo " "$rawfile2" data("$sizezip") phido("$sizephido")" >> $logfile 2>&1
703 # phidodiffcounter=`echo " $phidodiffcounter + 1 " | bc -l `
704 #else
705 # phidookcounter=`echo " $phidookcounter + 1 " | bc -l `
706 #fi
707 done
708
709 #result=$result"-"
710 # raw files
711 if [ $daqokcounter -eq ${daq[0]} ]
712 then
713 numok=`echo " $numok + 1 " | bc -l `
714 result4="0"
715 else
716 result4="1"
717 numpb=`echo " $numpb + 1 " | bc -l `
718 fi
719 # zipped files
720 # dl00
721 if [ $dl00okcounter -eq ${dl00[0]} ]
722 then
723 result4=$result4"0"
724 numok=`echo " $numok + 1 " | bc -l `
725 else
726 result4=$result4"1"
727 numpb=`echo " $numpb + 1 " | bc -l `
728 fi
729 # archive
730 # daq had been used, because archive[0] doesn't include fails[0]
731 #if [ $archiveokcounter -eq ${newdaq[0]} ]
732 # archive[0] had been used, because newdaq[0] might be empty
733 # in case the data was taken on data
734 #if [ $archiveokcounter -eq ${archive[0]} ]
735 # compare with daq[0] as there should be always data on data
736 if [ $archiveokcounter -eq ${daq[0]} ]
737 then
738 result4=$result4"0"
739 numok=`echo " $numok + 1 " | bc -l `
740 else
741 result4=$result4"1"
742 numpb=`echo " $numpb + 1 " | bc -l `
743 fi
744 # wue
745 if [ $wueokcounter -eq ${wue[0]} ]
746 then
747 result4=$result4"0"
748 numok=`echo " $numok + 1 " | bc -l `
749 else
750 result4=$result4"1"
751 numpb=`echo " $numpb + 1 " | bc -l `
752 fi
753 ## phido
754 #if [ $phidookcounter -eq ${phido[0]} ]
755 #then
756 # result4=$result4"0"
757 # numok=`echo " $numok + 1 " | bc -l `
758 #else
759 # result4=$result4"1"
760 # numpb=`echo " $numpb + 1 " | bc -l `
761 #fi
762 printprocesslog "INFO "$daqokcounter" files are ok on daq (raw)."
763 printprocesslog "INFO "$dl00okcounter" files are ok on dl00."
764 printprocesslog "INFO "$wueokcounter" files are ok in Wue."
765 printprocesslog "INFO "$archiveokcounter" files are ok in the archive."
766 #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 echo "INFO "$daqokcounter" files are ok on daq (raw)." >> $logfile 2>&1
773 echo "INFO "$dl00okcounter" files are ok on dl00." >> $logfile 2>&1
774 echo "INFO "$wueokcounter" files are ok in Wue." >> $logfile 2>&1
775 echo "INFO "$archiveokcounter" files are ok in the archive." >> $logfile 2>&1
776 #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
781 #echo "WARN "$phidodiffcounter" files have a different size on Phido." >> $logfile 2>&1
782 fi
783
784 # print summary:
785 printprocesslog "INFO day ok: "$numdaysok
786 printprocesslog "INFO numok: "$numok
787 printprocesslog "INFO numpb: "$numpb
788 printprocesslog "result:"
789 printprocesslog "(qla-#files-dudir-db-filesize)"
790 #printprocesslog " ldawp-ldawp-ldawp-ldawp"
791 printprocesslog " q-ldaw-ldaw-ldaw-ldaw"
792 printprocesslog " "$result1"-"$result2"-"$result3"-"$result4
793 echo "INFO day ok: "$numdaysok >> $logfile 2>&1
794 echo "INFO numok: "$numok >> $logfile 2>&1
795 echo "INFO numpb: "$numpb >> $logfile 2>&1
796 echo "result:" >> $logfile 2>&1
797 echo "(qla-#files-dudir-db-filesize)" >> $logfile 2>&1
798 #echo " ldawp-ldawp-ldawp-ldawp" >> $logfile 2>&1
799 echo " q-ldaw-ldaw-ldaw-ldaw" >> $logfile 2>&1
800 echo " "$result1"-"$result2"-"$result3"-"$result4 >> $logfile 2>&1
801 sumdatanew=`echo " ( ${daq[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l | cut -d. -f1`
802 sumdata=`echo " $sumdata + $sumdatanew " | bc -l | cut -d. -f1`
803 printprocesslog "checked alread "$sumdata" GB. "$sumdatanew" "${daq[1]}" "${zip[1]}
804 if [ $numpb -lt 4 ]
805 then
806 numdaysok=`echo " $numdaysok + 1 " | bc -l `
807 fi
808
809 echo ""
810 echo "SUMMARY for "$date
811 echo "-----------------------"
812 echo "" >> $logfile 2>&1
813 echo "SUMMARY for "$date >> $logfile 2>&1
814 echo "-----------------------" >> $logfile 2>&1
815 echo "" >> $logfile2 2>&1
816 echo "SUMMARY for "$date >> $logfile2 2>&1
817 echo "-----------------------" >> $logfile2 2>&1
818 #echo "res1:"$result1
819 #echo "res3:"$result3
820 #echo "res4:"$result4
821 #echo "arch:"${archive[0]}
822 #echo "isdc:"$numisdc
823 if [ "$result1" = "0-0000" ] && [ "$result3" = "0000" ] && [ "$result4" = "0000" ]
824 then
825 echo " EVERYTHING is ok. "$date" can be deleted. "
826 echo " EVERYTHING is ok. "$date" can be deleted. " >> $logfile 2>&1
827 echo " EVERYTHING is ok. "$date" can be deleted. " >> $logfile2 2>&1
828 echo " Details in the logfile "$logfile
829 echo " Details in the logfile "$logfile >> $logfile 2>&1
830 echo " Details in the logfile "$logfile >> $logfile2 2>&1
831 sendemail="yes"
832 else
833 if [ "$result1" = "0-0000" ] && [ "$result3" = "0010" ] && [ "$result4" = "0000" ] && [ ${archive[0]} -eq $numisdc ]
834 then
835 echo " "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. "
836 echo " "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. " >> $logfile 2>&1
837 echo " "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. " >> $logfile2 2>&1
838 echo " TRANSFER is ok. "$date" can be deleted. "
839 echo " TRANSFER is ok. "$date" can be deleted. " >> $logfile 2>&1
840 echo " TRANSFER is ok. "$date" can be deleted. " >> $logfile2 2>&1
841 echo " Details in the logfile "$logfile
842 echo " Details in the logfile "$logfile >> $logfile 2>&1
843 echo " Details in the logfile "$logfile >> $logfile2 2>&1
844 sendemail="yes"
845 else
846 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile
847 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
848 echo " "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
849 echo " resetting jobs in the DB might be needed."
850 echo " resetting jobs in the DB might be needed." >> $logfile 2>&1
851 echo " resetting jobs in the DB might be needed." >> $logfile2 2>&1
852 fi
853 fi
854 if [ $daqdiffcounter -gt 0 ]
855 then
856 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)."
857 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile 2>&1
858 echo " WARN "$daqdiffcounter" files have a different size on daq (raw)." >> $logfile2 2>&1
859 fi
860 if [ $dl00diffcounter -gt 0 ]
861 then
862 echo " WARN "$dl00diffcounter" files have a different size on dl00."
863 echo " WARN "$dl00diffcounter" files have a different size on dl00." >> $logfile 2>&1
864 echo " WARN "$dl00diffcounter" files have a different size on dl00." >> $logfile2 2>&1
865 fi
866 if [ $wuediffcounter -gt 0 ]
867 then
868 echo " WARN "$wuediffcounter" files have a different size in Wue."
869 echo " WARN "$wuediffcounter" files have a different size in Wue." >> $logfile 2>&1
870 echo " WARN "$wuediffcounter" files have a different size in Wue." >> $logfile2 2>&1
871 fi
872 if [ $archivediffcounter -gt 0 ]
873 then
874 echo " WARN "$archivediffcounter" files have a different size in the archive."
875 echo " WARN "$archivediffcounter" files have a different size in the archive." >> $logfile 2>&1
876 echo " WARN "$archivediffcounter" files have a different size in the archive." >> $logfile2 2>&1
877 fi
878 if ! [ $numdatruns -eq $qla ]
879 then
880 echo "WARN not all data runs are processed yet by the QLA. "
881 echo "WARN not all data runs are processed yet by the QLA. " >> $logfile 2>&1
882 echo "WARN not all data runs are processed yet by the QLA. " >> $logfile2 2>&1
883 fi
884done
885
886#sendemail="yes"
887if [ "$sendemail" = "yes" ]
888then
889 echo ""
890 echo "INFO send email with "$logfile2"to shift@fact-project.org "
891 printprocesslog "INFO send email with "$logfile2"to shift@fact-project.org "
892 cat $logfile2 | mail -s "testmail for info on deleting data" shift@fact-project.org
893fi
894
895printprocesslog "INFO finished $0"
896
Note: See TracBrowser for help on using the repository browser.