Changeset 7465 for trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck
r7460 r7465 41 41 42 42 user=`whoami` 43 program=datacheck 43 44 source /home/$user/Mars/datacenter/scripts/sourcefile 44 45 … … 54 55 55 56 todofile=$listpath/ToDo-$table-$column 56 getstatuslogpath=$logpath/getstatus/ dodatacheck/$year57 getstatuslog=$getstatuslogpath/getstatus- dodatacheck-$datetime.log58 59 scriptlogpath=$logpath/run/ dodatacheck/`date +%Y/%m`57 getstatuslogpath=$logpath/getstatus/$program/$year 58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 59 60 scriptlogpath=$logpath/run/$program/`date +%Y/%m` 60 61 makedir $scriptlogpath 61 scriptlog=$scriptlogpath/ dodatacheck-$datetime.log62 scriptlog=$scriptlogpath/$program-$datetime.log 62 63 63 64 date >> $scriptlog 2>&1 … … 70 71 then 71 72 echo "other file(s) on disk " >> $scriptlog 2>&1 72 echo " -> choose one file and start datacheck" >> $scriptlog 2>&173 echo " -> choose one file and start $program " >> $scriptlog 2>&1 73 74 else 74 date > $lockpath/lock-getting- dodatacheck-list.txt >> $scriptlog 2>&175 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 75 76 checklock0=$? 76 77 case $checklock0 in 77 78 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 78 79 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 79 echo "-> getting list for dodatacheckis running -> exit" >> $scriptlog 2>&180 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 80 81 date >> $scriptlog 2>&1 81 82 exit;; … … 87 88 88 89 case $check0 in 89 1) echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;;90 1) echo "check0=$check0 -> everything ok -> do $program" >> $scriptlog 2>&1;; 90 91 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 91 92 esac 92 rm -v $lockpath/lock-getting- dodatacheck-list.txt >> $scriptlog 2>&193 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 93 94 fi 94 95 … … 143 144 do 144 145 date 145 echo "do datacheckfor run "$run >> $scriptlog 2>&1146 echo "do $program for run "$run >> $scriptlog 2>&1 146 147 no=`printf %08d $run | cut -c 0-2` 147 148 no2=`printf %08d $run` … … 163 164 164 165 case $check1 in 165 1) echo "check1=$check1 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1166 1) echo "check1=$check1 -> everything ok -> go on with $program..." >> $scriptlog 2>&1 166 167 ;; 167 168 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 … … 185 186 186 187 case $check2 in 187 0) echo "check2=$check2 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1188 0) echo "check2=$check2 -> everything ok -> go on with $program..." >> $scriptlog 2>&1 188 189 ;; 189 190 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 … … 225 226 226 227 # set status 227 echo "inserting the status for the datacheck for run $run into the db" >> $scriptlog 2>&1 228 setstatuslogpath=$logpath/setstatus/datacheck/$date 229 echo "setstatuslogpath: $setstatuslogpath" >> $scriptlog 2>&1 230 makedir $setstatuslogpath >> $scriptlog 2>&1 231 setstatuslog=$setstatuslogpath/setstatus-datacheck-$no2.log 232 echo "setstatuslogfile: $setstatuslog" >> $scriptlog 2>&1 233 234 check4=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 235 case $check4 in 236 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1 237 ;; 238 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1 239 ;; 240 esac 228 echo "inserting the status for the $program for run $run into the db" >> $scriptlog 2>&1 229 statustime="Now()" 230 failed="NULL" 231 starttime="NULL" 232 failedtime="NULL" 233 var1=$date 234 var2=$no2 235 setstatus 241 236 done 242 237
Note:
See TracChangeset
for help on using the changeset viewer.