Changeset 7051
- Timestamp:
- 05/17/05 16:53:35 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7050 r7051 116 116 - adapted paths 117 117 118 * datacenter/scripts/insertdataset 119 - added logging 120 118 121 * datacenter/scripts/runganymed 119 122 - added (script to run ganymed automatically for datasets) 123 124 * datacenter/scripts/runcallisto 125 - adapted paths 126 - fixed bug 127 128 * datacenter/scripts/runstar 129 - adapted paths 130 - fixed bug 120 131 121 132 * steps.rc -
trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
r7037 r7051 36 36 cd /home/operator/Mars.cvs 37 37 38 datetime=`date +%F-%H-%M-%S` 39 year=`date +%Y` 40 41 scriptlogpath=$logpath/run/insertdatasets/`date +%Y/%m` 42 if [ ! -d $scriptlogpath ] 43 then 44 mkdir -pv $scriptlogpath 45 if [ ! -d $scriptlogpath ] 46 then 47 echo "could not make scriptlogpath "$scriptlogpath 48 exit 49 fi 50 fi 51 52 scriptlog=$scriptlogpath/insertdatasets-$datetime.log 53 54 date >> $scriptlog 2>&1 55 56 date > $lockpath/lock-insertdatasets.txt >> $scriptlog 2>&1 57 checklock0=$? 58 case $checklock0 in 59 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 60 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 61 echo "-> getting list for callisto is running -> exit" >> $scriptlog 2>&1 62 date >> $scriptlog 2>&1 63 exit;; 64 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 65 esac 66 38 67 39 68 datasetfiles=(`ls /magic/datasets/*/*`) 40 echo "datasetfiles: "${datasetfiles[@]} 41 echo "" 69 echo "datasetfiles: "${datasetfiles[@]} >> $scriptlog 2>&1 70 echo "" >> $scriptlog 2>&1 42 71 43 72 for datasetfile in ${datasetfiles[@]} … … 48 77 if [ "$no" = "$no3" ] 49 78 then 50 echo "number in filename and in file are the same -> continue" 79 echo "number in filename and in file are the same -> continue" >> $scriptlog 2>&1 51 80 else 52 echo "number in filename and in file are not the same " 53 echo " -> continue with next dataset" 81 echo "number in filename and in file are not the same " >> $scriptlog 2>&1 82 echo " -> continue with next dataset" >> $scriptlog 2>&1 54 83 continue 55 84 fi 56 source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'` 57 mode=`grep 'WobbleMode:' $datasetfile` 58 mode2=`echo $mode | grep ^\#` 85 source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'` >> $scriptlog 2>&1 86 mode=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1 87 mode2=`echo $mode | grep ^\#` >> $scriptlog 2>&1 59 88 if [ "$mode2" = "" ] 60 89 then 61 wobble="Y" 90 wobble="Y" >> $scriptlog 2>&1 62 91 else 63 wobble="N" 92 wobble="N" >> $scriptlog 2>&1 64 93 fi 65 echo "file: "$datasetfile 66 echo " datasetno: "$no2 67 echo " sourcename: "$source 68 echo " wobble: "$wobble 69 echo " " 70 # check0=`root -q -b $macrospath/insertdataset.C+\("\"$no\""\,"\"$source\""\,"\"$type\""\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'` 71 check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\"",kFALSE\) | grep int | sed -e 's/(int)//'` 94 echo "file: "$datasetfile >> $scriptlog 2>&1 95 echo " datasetno: "$no2 >> $scriptlog 2>&1 96 echo " sourcename: "$source >> $scriptlog 2>&1 97 echo " wobble: "$wobble >> $scriptlog 2>&1 98 echo " " >> $scriptlog 2>&1 99 100 insertdatasetpath=$logpath/insertdataset/$no3 101 if [ ! -d $insertdatasetpath ] 102 then 103 mkdir -pv $insertdatasetpath >> $scriptlog 2>&1 104 if [ ! -d $insertdatasetpath ] 105 then 106 echo "could not make insertdatasetpath "$insertdatasetpath >> $scriptlog 2>&1 107 continue 108 fi 109 fi 110 insertdatasetlog=$insertdatasetpath/insertdataset-$no3.log 111 check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\"",kFALSE\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'` 72 112 case $check0 in 73 1) echo "check0=$check0 -> everthing ok " ;;74 *) echo "check0=$check0 -> ERROR " ;;113 1) echo "check0=$check0 -> everthing ok " >> $scriptlog 2>&1 ;; 114 *) echo "check0=$check0 -> ERROR " >> $scriptlog 2>&1 ;; 75 115 esac 76 116 done 77 117 118 rm -v $todofile >> $scriptlog 2>&1 119 rm -v $lockpath/lock-insertdatasets.txt >> $scriptlog 2>&1 78 120 121 set +C 122 123 date >> $scriptlog 2>&1 124 125 -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7030 r7051 172 172 for sequence in ${sequences[@]} 173 173 do 174 no=`printf %08d $sequence | cut -c 4` 175 outpath="/magic/data/callisto/"`printf %04d $no`"/"`printf %08d $sequence` 174 no=`printf %08d $sequence | cut -c 0-4` 175 no2=`printf %08d $sequence` 176 outpath="/magic/data/callisto/$no/$no2" 176 177 echo "outpath: "$outpath >> $scriptlog 2>&1 177 178 if [ ! -d $outpath ] … … 184 185 fi 185 186 fi 186 sequfile="/magic/sequences/ "`printf %04d $no`"/sequence"`printf %08d $sequence`".txt"187 sequfile="/magic/sequences/$no/sequence$no2.txt" 187 188 echo "sequfile: "$sequfile >> $scriptlog 2>&1 188 189 … … 198 199 199 200 echo "run callisto..." >> $scriptlog 2>&1 200 ./callisto -b -q -f -raw --log=$outpath/callisto$ sequence.log --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null201 ./callisto -b -q -f -raw --log=$outpath/callisto$no2.log --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null 201 202 check1=$? 202 203 … … 275 276 276 277 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 277 setstatuslogpath=$logpath/setstatus/callisto/ `printf %04d $no`278 setstatuslogpath=$logpath/setstatus/callisto/$no 278 279 if [ ! -d $setstatuslogpath ] 279 280 then … … 285 286 fi 286 287 fi 287 setstatuslog=$setstatuslogpath/setstatus-callisto 288 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog -$sequence.log| grep int | sed -e 's/(int)//'`288 setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log 289 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 289 290 case $check4 in 290 291 1) echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7050 r7051 171 171 do 172 172 no=`printf %08d $dataset | cut -c 0-4` 173 outpath="/magic/data/ganymed/$no/"`printf %08d $dataset` 174 inpath=`echo $outpath | sed -e 's/ganymed/star/'` 175 echo "inpath: "$inpath >> $scriptlog 2>&1 173 no2=`printf %08d $dataset` 174 outpath="/magic/data/ganymed/$no/$no2" 176 175 echo "outpath: "$outpath >> $scriptlog 2>&1 177 176 if [ ! -d $outpath ] … … 184 183 fi 185 184 fi 186 datasetfile="/magic/datasets/$no/dataset "`printf %08d $dataset`".txt"185 datasetfile="/magic/datasets/$no/dataset$no2.txt" 187 186 echo "datasetfile: "$datasetfile >> $scriptlog 2>&1 188 187 189 188 echo "run ganymed..." >> $scriptlog 2>&1 190 ./ganymed -b -q -f --log=$outpath/ganymed$ dataset.log --ind=$inpath--out=$outpath $datasetfile 2>> $scriptlog> /dev/null189 ./ganymed -b -q -f --log=$outpath/ganymed$no2.log --out=$outpath $datasetfile 2>> $scriptlog> /dev/null 191 190 check1=$? 192 191 … … 204 203 fi 205 204 fi 206 setstatuslog=$setstatuslogpath/setstatus-ganymed 207 check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog -$dataset.log| grep int | sed -e 's/(int)//'`205 setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log 206 check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 208 207 case $check4 in 209 208 1) echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7030 r7051 167 167 for sequence in ${sequences[@]} 168 168 do 169 no=`printf %08d $sequence | cut -c 4` 170 outpath="/magic/data/star/"`printf %04d $no`"/"`printf %08d $sequence` 169 no=`printf %08d $sequence | cut -c 0-4` 170 no2=`printf %08d $sequence` 171 outpath="/magic/data/star/$no/$no2" 171 172 inpath=`echo $outpath | sed -e 's/star/callisto/'` 172 173 echo "inpath: "$inpath >> $scriptlog 2>&1 … … 181 182 fi 182 183 fi 183 sequfile="/magic/sequences/ "`printf %04d $no`"/sequence"`printf %08d $sequence`".txt"184 sequfile="/magic/sequences/$no/sequence$no2.txt" 184 185 echo "sequfile: "$sequfile >> $scriptlog 2>&1 185 186 … … 191 192 0) echo "check1=$check1 -> everthing ok " >> $scriptlog 2>&1 192 193 echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1 193 setstatuslogpath=$logpath/setstatus/star/ `printf %04d $no`194 setstatuslogpath=$logpath/setstatus/star/$no 194 195 if [ ! -d $setstatuslogpath ] 195 196 then … … 201 202 fi 202 203 fi 203 setstatuslog=$setstatuslogpath/setstatus-star 204 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog -$sequence.log| grep int | sed -e 's/(int)//'`204 setstatuslog=$setstatuslogpath/setstatus-star-$no2.log 205 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 205 206 case $check4 in 206 207 1) echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;;
Note:
See TracChangeset
for help on using the changeset viewer.