Changeset 9091
- Timestamp:
- 08/05/08 12:31:49 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9090 r9091 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2008/08/05 Stefan Ruegamer 22 23 * datacenter/scripts/movingrawfiles: 24 - added checks for owner of the file 25 - adapted the script to the different pathes 26 27 * datacenter/scripts/zipscript: 28 - added telno and fileno so it works with the new files 29 - added the telno to the calzip-lock file 30 31 * datacenter/scripts/runcallisto: 32 - added the telno to the calzip-lock file 33 34 20 35 21 36 2008/08/05 Thomas Bretz -
trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles
r9081 r9091 51 51 ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1 52 52 53 printprocesslog "INFO moving directories from muxdata to rawdata" 54 # find directories which have to be copied 55 days=`find /magic/datacenter/fromtape/muxdata/* -type d` 56 if [ ! "$days" == "" ] 57 then 58 # move directories to the tapedirectory 59 mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1 60 fi 61 62 # find rawfiles 63 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/*data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f` 53 # find rawfiles belonging to tape (don't move files not yet md5-sum checked) 54 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/???data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f -user tape` 64 55 65 56 if [ "$rawfiles" == "" ] … … 69 60 fi 70 61 62 # move rawfiles 71 63 printprocesslog "INFO moving rawfiles to $datapath/rawfiles" 72 64 for rawfile in $rawfiles … … 77 69 if [ "$path" == "datacenter" ] 78 70 then 79 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 71 subpath=`dirname $rawfile | cut -d/ -f5` 72 newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/'${subpath}'/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'` 80 73 elif [ "$path" == "data" ] 81 74 then … … 93 86 done 94 87 95 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/ *data/* >> $scriptlog 2>&188 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&1 96 89 97 90 printprocesslog "INFO launching filesondisk" -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r9054 r9091 95 95 96 96 # lock sequ for zipping 97 lockfile=$lockpath/calzip$ sequence.txt97 lockfile=$lockpath/calzip${sequence}-${telnum}.txt 98 98 # if lockfile is already existing, 1 is returned 99 99 if ! checklock return 1 >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/zipscript
r9049 r9091 32 32 # to give the possibility to run several zipscripts at the same time, 33 33 # $1 is added 34 program=zipscript $134 program=zipscript2 35 35 36 36 set -C … … 57 57 echo "processing file $file..." >> $scriptlog 2>&1 58 58 runno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\2/'` 59 query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno 59 fileno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\3/'` 60 telno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\1/' | cut -c2` 61 # old runs have a fileno of 0 62 if [ "$fileno" == "" ] 63 then 64 fileno=0 65 fi 66 # old runs have a telno of 1 67 if [ "$telno" == "" ] 68 then 69 telno=1 70 fi 71 query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno" AND fFileNumber="$fileno" AND fTelescopeNumber="$telno 60 72 echo " sending query: $query" >> $scriptlog 2>&1 61 73 if ! seq=`sendquery` 62 74 then 63 echo "querying seq for run $runnofrom the db did not work -> continue" >> $scriptlog 2>&164 printprocesslog "WARN query $seq for run $runnofrom the db did not work"75 echo "querying seq for run M_${telno}${runno}.${fileno} from the db did not work -> continue" >> $scriptlog 2>&1 76 printprocesslog "WARN query $seq for run M_${telno}${runno}.${fileno} from the db did not work" 65 77 continue 66 78 fi 67 79 if [ "$seq" == "" ] 68 80 then 69 echo "no seq found for run $runno-> locking only run..." >> $scriptlog 2>&181 echo "no seq found for run M_${telno}${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&1 70 82 seq=$runno 71 83 fi 72 84 echo "locking sequence $seq..." >> $scriptlog 2>&1 73 lockfile=$lockpath/calzip$ seq.txt85 lockfile=$lockpath/calzip${seq}-${telno}.txt 74 86 checklock continue >> $scriptlog 2>&1 75 87 query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq"
Note:
See TracChangeset
for help on using the changeset viewer.