Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/runganymed
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7460 r7465 38 38 39 39 user=`whoami` 40 program=ganymed 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column 52 getstatuslogpath=$logpath/getstatus/ ganymed/$year53 getstatuslog=$getstatuslogpath/getstatus- ganymed-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ ganymed/`date +%Y/%m/%d`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/run ganymed-$datetime.log58 scriptlog=$scriptlogpath/run$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 64 65 65 66 # check if getting of list is already running 66 date > $lockpath/lock-getting- ganymed-list.txt >> $scriptlog 2>&167 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 67 68 checklock0=$? 68 69 case $checklock0 in 69 70 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 70 71 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 71 echo "-> getting list for ganymedis running -> exit" >> $scriptlog 2>&172 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 72 73 date >> $scriptlog 2>&1 73 74 exit;; … … 80 81 then 81 82 echo "other file(s) on disk " >> $scriptlog 2>&1 82 echo " -> choose one file and run ganymed" >> $scriptlog 2>&183 echo " -> choose one file and run $program" >> $scriptlog 2>&1 83 84 else 84 85 echo "getting list..." >> $scriptlog 2>&1 … … 86 87 87 88 case $check0 in 88 1) echo "check0=$check0 -> everything ok -> run ganymed" >> $scriptlog 2>&1;;89 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 89 90 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 90 91 esac 91 92 fi 92 93 93 rm -v $lockpath/lock-getting- ganymed-list.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 95 95 96 # choosing todo file … … 141 142 no=`printf %08d $dataset | cut -c 0-5` 142 143 no2=`printf %08d $dataset` 143 outpath="$datapath/ ganymed/$no/$no2"144 outpath="$datapath/$program/$no/$no2" 144 145 echo "outpath: "$outpath >> $scriptlog 2>&1 145 146 makedir $outpath >> $scriptlog 2>&1 … … 156 157 mode="onoff" >> $scriptlog 2>&1 157 158 fi 158 ganymedrc=$setuppath/ ganymed/ganymed_$mode.rc159 ganymedrc=$setuppath/$program/$program_$mode.rc 159 160 160 echo "run ganymed..." >> $scriptlog 2>&1161 ./ganymed -b -q -v4 -f --ind=$datap th/star --config=$ganymedrc --log=$outpath/ganymed$no2.log --html=$outpath/ganymed$no2.html --out=$outpath $datasetfile 2>> $scriptlog> /dev/null161 echo "run $program..." >> $scriptlog 2>&1 162 ./ganymed -b -q -v4 -f --ind=$datapath/star --config=$ganymedrc --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath $datasetfile 2>> $scriptlog> /dev/null 162 163 check1=$? 163 164 164 165 case $check1 in 165 166 0) echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1 166 echo "-> inserting the status for ganymed for dataset $dataset into the db" >> $scriptlog 2>&1 167 setstatuslogpath=$logpath/setstatus/ganymed/$no 168 makedir $setstatuslogpath >> $scriptlog 2>&1 169 setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log 170 171 check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 172 case $check4 in 173 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 174 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 175 esac 167 echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1 168 statustime="Now()" 169 failed="NULL" 170 starttime="NULL" 171 failedtime="NULL" 172 var1=$no 173 var2=$no2 174 setstatus 176 175 ;; 177 176 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note:
See TracChangeset
for help on using the changeset viewer.