Changeset 9114 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 08/12/08 10:20:17 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkmd5sum
r8886 r9114 62 62 63 63 date | tee ${checkpath}/tape_${id}.md5.lapalma | tee ${checkpath}/tape_${id}.md5.wue 64 muxslog=`grep muxdata/20[01][0-9].*/20[01][0-9].*.raw $file | wc -l` 64 65 65 66 # read the tapecont file line by line … … 67 68 do 68 69 muxchk=`echo $line | cut -d/ -f1` 69 type=`echo $line | cut -d_ -f7 | cut -c0-5`70 type=`echo $line | sed -e 's/.*20[01][0-9]\{5\}_.*\(.raw\)/\1/' | cut -c 0-4` 70 71 # only check muxdata rawfiles, not cc-, caco- or drivelog-files 71 if [ "$muxchk" = "muxdata" ] && [ "$type" = " E.raw" ]72 if [ "$muxchk" = "muxdata" ] && [ "$type" = ".raw" ] 72 73 then 73 74 sum=($line) … … 103 104 echo "Wrote checksums to ${checkpath}/tape_${id}.md5.lapalma and ${checkpath}/tape_${id}.md5.wue. Comparing now." 104 105 105 106 106 # check for differences in the checksums 107 107 output=`diff ${checkpath}/tape_${id}.md5.lapalma ${checkpath}/tape_${id}.md5.wue` … … 109 109 if [ "$output" = "" ] 110 110 then 111 echo "All checksums are ok! Launching movingrawfiles now."# to be included 111 echo "All checksums are identical!" 112 muxschk=`grep muxdata/20[01][0-9].*/20[01][0-9].*.raw ${checkpath}/tape_${id}.md5.wue | wc -l` 113 if [ $muxslog == $muxschk ] 114 then 115 echo "Number of checked files matches. Launching movingrawfiles now. (to be included)" | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue 116 else 117 echo "Number of checked files doesn't match number of extracted files. Something went wrong..." | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue 118 fi 112 119 else 113 120 echo -e "The files are not identical! diff found the following differences:\n$output" -
trunk/MagicSoft/Mars/datacenter/scripts/webupdate-callisto
r8482 r9114 38 38 39 39 echo "do rsync for callisto files" >> $scriptlog 2>&1 40 rsync -av --delete --exclude=*/*/ *_E[.]root --exclude=*/*/callisto.rc $datapath/callisto/ $webpath/callisto >> $scriptlog 2>&140 rsync -av --delete --exclude=*/*/20[01][0-9]*_Y_*[.]root --exclude=*/*/callisto.rc $datapath/callisto/ $webpath/callisto >> $scriptlog 2>&1 41 41 42 42 echo "do rsync for subsystem files" >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/webupdate-star
r8482 r9114 38 38 39 39 echo "do rsync for star files" >> $scriptlog 2>&1 40 rsync -av --delete --exclude=*/*/*_E[.]root $datapath/star/ $webpath/star >> $scriptlog 2>&140 rsync -avn --delete --exclude=*/*/20[01][0-9]*_I_*[.]root $datapath/star/ $webpath/star >> $scriptlog 2>&1 41 41 42 42 echo "do rsync for star files from la palma" >> $scriptlog 2>&1 43 rsync -av --delete --exclude=*/*_E[.]root --exclude=*/Time*.dat /scratch/lapalma/star/ $webpath/star_lapalma >> $scriptlog 2>&143 rsync -avn --delete --exclude=*/20[01][0-9]*_I_*[.]root --exclude=*/Time*.dat /scratch/lapalma/star/ $webpath/star_lapalma >> $scriptlog 2>&1 44 44 45 45 echo "do rsync for sequence files" >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/zipscript
r9093 r9114 19 19 # 20 20 # Author(s): Daniela Dorner 09/2006 <mailto:dorner@astro.uni-wuerzburg.de> 21 # Author(s): Stefan Ruegamer 08/2008 <mailto:snruegam@astro.uni-wuerzburg.de> 21 22 # 22 23 # Copyright: MAGIC Software Development, 2000-2007 … … 55 56 for file in ${files[@]} 56 57 do 57 echo "processing file $file..." >> $scriptlog 2>&1 58 if ! [ -f $file ] 59 then 60 continue 61 fi 62 63 echo -e "\nprocessing file $file..." >> $scriptlog 2>&1 58 64 runno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\2/'` 59 65 fileno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\3/'` … … 69 75 telno=1 70 76 fi 77 78 # get the sequence corresponding to the run 71 79 query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno" AND fFileNumber="$fileno" AND fTelescopeNumber="$telno 72 echo " sending query: $query" >> $scriptlog 2>&1 80 echo " sending query: $query" >> $scriptlog 2>&1 73 81 if ! seq=`sendquery` 74 82 then 75 echo "querying seq for run M _${telno}${runno}.${fileno} from the db did not work -> continue" >> $scriptlog 2>&176 printprocesslog "WARN query $seq for run M _${telno}${runno}.${fileno} from the db did not work"83 echo "querying seq for run M${telno}_${runno}.${fileno} from the db did not work -> continue" >> $scriptlog 2>&1 84 printprocesslog "WARN query $seq for run M${telno}_${runno}.${fileno} from the db did not work" 77 85 continue 78 86 fi 79 if [ "$seq" == "" ] 87 if [ "$seq" == "" ] || [ "$seq" == "0" ] 80 88 then 81 echo "no seq found for run M _${telno}${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&182 seq=$ runno89 echo "no seq found for run M${telno}_${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&1 90 seq=${runno}.${fileno} 83 91 fi 84 echo "locking sequence $seq..." >> $scriptlog 2>&1 92 93 # lock the sequence against zipscript 94 echo "locking sequence ${seq}-${telno}..." >> $scriptlog 2>&1 85 95 lockfile=$lockpath/calzip${seq}-${telno}.txt 86 96 checklock continue >> $scriptlog 2>&1 87 query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq" 88 echo " sending query: $query" >> $scriptlog 2>&1 97 98 # lock the run in the db 99 query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq AND fTelescopeNumber=$telno" 100 echo " sending query: $query" >> $scriptlog 2>&1 89 101 if ! sendquery 90 102 then 91 echo "locking $ seqfor callisto in db did not work ..." >> $scriptlog 2>&192 printprocesslog "WARN locking $ seqfor callisto in db did not work"103 echo "locking ${seq}-${telno} for callisto in db did not work ..." >> $scriptlog 2>&1 104 printprocesslog "WARN locking ${seq}-${telno} for callisto in db did not work" 93 105 rm -v $lockfile >> $scriptlog 2>&1 94 106 continue 95 107 fi 108 109 # zip the run 96 110 echo "zipping $file ..." >> $scriptlog 2>&1 97 111 if ssh -xn phoenix nice -n 19 gzip -1f $file >> $scriptlog 2>&1 … … 102 116 printprocesslog "WARN zipping $file did not work" 103 117 fi 104 echo "unlocking sequence $seq..." >> $scriptlog 2>&1 105 query="UPDATE SequenceProcessStatus set fNotZipping=Now() WHERE fSequenceFirst=$seq" 106 echo " sending query: $query" >> $scriptlog 2>&1 118 119 # unlock the sequence in the db 120 echo "unlocking sequence ${seq}-${telno}..." >> $scriptlog 2>&1 121 query="UPDATE SequenceProcessStatus set fNotZipping=Now() WHERE fSequenceFirst=$seq AND fTelescopeNumber=$telno" 122 echo " sending query: $query" >> $scriptlog 2>&1 107 123 if ! sendquery 108 124 then 109 echo "unlocking $ seqfor callisto in db did not work ..." >> $scriptlog 2>&1110 printprocesslog "ERROR unlocking $ seqfor callisto in db did not work"125 echo "unlocking ${seq}-${telno} for callisto in db did not work ..." >> $scriptlog 2>&1 126 printprocesslog "ERROR unlocking ${seq}-${telno} for callisto in db did not work" 111 127 rm -v $lockfile >> $scriptlog 2>&1 112 128 continue
Note:
See TracChangeset
for help on using the changeset viewer.