Changeset 17108
- Timestamp:
- 09/06/13 17:39:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/Step1.sh
r17003 r17108 7 7 datepath=`date --date="-19HOUR" +%Y/%m/%d` 8 8 date=`date --date="-19HOUR" +%Y%m%d` 9 #datepath="2013/07/13" 10 #date="20130713" 9 # for processing by hand 10 #datepath="2013/08/11" 11 #date="20130811" 11 12 printprocesslog "INFO processing "$datepath 12 13 night=`echo $datepath | sed -e 's/\///g'` … … 51 52 then 52 53 printprocesslog "INFO rsync "$1 53 #if ! rsync -av --stats $1 $2 54 #if ! rsync -av $1 $2 55 if ! rsync -a -T $rsynctempdir $1 $2 54 # rsync 55 # from newdaq (/newdaq = /fact on newdaq), rsync server newdaq::newdaq/ 56 # to daq (/daq = /loc_data on daq) 57 rsyncservernewdaq=`echo $1 | sed -e 's/^\//172.16.100.100::/'` 58 # old 59 #if ! rsync -a -T $rsynctempdir $1 $2 60 # new (workaround for problems on daq) 61 if ! rsync -a -T $rsynctempdir $rsyncservernewdaq $2 56 62 then 57 63 printprocesslog "WARN rsync of "$1" failed." … … 112 118 printprocesslog "processing "$file 113 119 localfile=`echo $file | sed -e 's/newdaq/loc_data/'` 114 #echo "processing "$file" "$localfile115 116 if [ "`echo $file | grep -o drs`" == "drs" ]117 then118 nondrsfile=`echo $file | sed -e 's/[.]drs//g'`119 tstop=`$factpath/fitsdump -h $nondrsfile 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'`120 else121 tstop=`$factpath/fitsdump -h $file 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'`122 fi123 if [ "$tstop" == "0" ]124 then125 printprocesslog "WARN "$file" not yet closed."126 fileaccessed=`find $file -amin -30`127 if ! [ "$fileaccessed" == "" ]128 then129 printprocesslog "INFO "$file" was accessed in the last 30 minutes => continue"130 continue131 else132 printprocesslog "WARN: "$file" has empty TSTOP but was not touched for 30 minutes"133 fileerror="yes"134 fi135 fi136 120 137 121 source `dirname $0`/../Sourcefile.sh 122 # check if file is already transferred 138 123 if ! ls $localfile >/dev/null 2>&1 139 124 then 140 #if ! rsync -av --stats --progress --bwlimit=$bwlimit $file $localfile 141 if ! rsync -a -T $rsynctempdir --bwlimit=$bwlimit $file $localfile 125 # check if it is drs-file 126 # get stop time from raw-file 127 if [ "`echo $file | grep -o drs`" == "drs" ] 128 then 129 nondrsfile=`echo $file | sed -e 's/[.]drs//g'` 130 tstop=`$factpath/fitsdump -h $nondrsfile 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'` 131 else 132 tstop=`$factpath/fitsdump -h $file 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'` 133 fi 134 # when stop time is 0, file is not closed 135 if [ "$tstop" == "0" ] 136 then 137 printprocesslog "WARN "$file" not yet closed." 138 # if a file is not closed and not touched for 30 minutes, 139 # it is assumed corrupted and still transferred 140 fileaccessed=`find $file -amin -30` 141 if ! [ "$fileaccessed" == "" ] 142 then 143 printprocesslog "INFO "$file" was accessed in the last 30 minutes => continue" 144 continue 145 else 146 printprocesslog "WARN: "$file" has empty TSTOP but was not touched for 30 minutes" 147 fileerror="yes" 148 fi 149 fi 150 151 # rsync 152 # from newdaq (/newdaq = /fact on newdaq), rsync server newdaq::newdaq/ 153 # to daq (/daq = /loc_data on daq) 154 # to access rsync server via the dedicated network between 155 # daq and newdaq, use 172.16.100.100::newdaq 156 filersyncserver=`echo $file | sed -e 's/^\//172.16.100.100::/'` 157 # old 158 ##if ! rsync -av --stats --progress --bwlimit=$bwlimit $file $localfile 159 #if ! rsync -a -T $rsynctempdir --bwlimit=$bwlimit $file $localfile 160 # new 161 if ! rsync -a -W -T $rsynctempdir --bwlimit=$bwlimit $filersyncserver $localfile 142 162 then 143 163 printprocesslog "ERROR something went wrong with rsync of "$file
Note:
See TracChangeset
for help on using the changeset viewer.