Changeset 7476 for trunk/MagicSoft
- Timestamp:
- 02/03/06 16:42:00 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7471 r7476 46 46 table=SequenceBuildStatus 47 47 column=fSequenceEntriesBuilt 48 date=NULL49 datetime=`date +%F-%H-%M-%S`50 year=`date +%Y`51 48 52 49 todofile=$listpath/ToDo-$table-$column.txt 53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 50 lockfile=$lockpath/lock-$program.txt 55 51 56 52 scriptlogpath=$logpath/run/$program/`date +%Y/%m` … … 60 56 date >> $scriptlog 2>&1 61 57 62 makedir $getstatuslogpath >> $scriptlog 2>&163 64 58 # check if script is already running 65 date > $lock path/lock-$program.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 75 69 76 70 # get todo list 77 echo "getting todo list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'` 79 80 case $check0 in 81 1) echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 83 rm -v $todofile >> $scriptlog 2>&1 84 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 85 date >> $scriptlog 2>&1 86 exit;; 87 esac 71 getdolist >> $scriptlog 2>&1 88 72 89 73 # retrieve dates from todofile … … 92 76 then 93 77 echo "nothing to do -> exit" >> $scriptlog 2>&1 94 rm -v $todofile >> $scriptlog 2>&1 95 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 96 date >> $scriptlog 2>&1 97 exit 78 finish >> $scriptlog 2>&1 98 79 fi 99 80 … … 107 88 buildsequentriespath=$logpath/$program/$year2 108 89 makedir $buildsequentriespath >> $scriptlog 2>&1 90 buildsequenceentrieslog=$buildsequentriespath/buildsequenceentries-$date.log 109 91 110 92 echo "run $program..." >> $scriptlog 2>&1 111 93 setstatus "start" >> $scriptlog 2>&1 112 94 113 check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentries path/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`95 check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentrieslog | grep int | sed -e 's/(int)//'` 114 96 115 97 case $check1 in … … 125 107 done 126 108 127 rm -v $todofile >> $scriptlog 2>&1 128 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 109 finish >> $scriptlog 2>&1 129 110 130 set +C131 132 date >> $scriptlog 2>&1133 -
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r7471 r7476 37 37 38 38 user=`whoami` 39 program=checkfile avail39 program=checkfilesavail 40 40 source /home/$user/Mars/datacenter/scripts/sourcefile 41 41 42 42 table=SequenceProcessStatus 43 43 column=fAllFilesAvail 44 date=NULL45 datetime=`date +%F-%H-%M-%S`46 year=`date +%Y`47 44 48 45 todofile=$listpath/ToDo-$table-$column.txt 49 getstatuslogpath=$logpath/getstatus/$program/$year 50 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 46 lockfile=$lockpath/lock-$program.txt 51 47 52 scriptlogpath=$logpath/run/ checkfilesavail/`date +%Y/%m/%d`48 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 53 49 makedir $scriptlogpath 54 55 scriptlog=$scriptlogpath/checkfilesforsequenceavail-$datetime.log 50 scriptlog=$scriptlogpath/$program-$datetime.log 56 51 57 52 date >> $scriptlog 2>&1 58 59 makedir $getstatuslogpath >> $scriptlog 2>&160 53 61 54 cd $mars 62 55 63 56 # check if script is already running 64 date > $lock path/lock-$program.txt>> $scriptlog 2>&157 date > $lockfile >> $scriptlog 2>&1 65 58 checklock0=$? 66 59 case $checklock0 in … … 74 67 75 68 # get todo list 76 echo "getting list..." >> $scriptlog 2>&1 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 78 79 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 81 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 86 esac 69 getdolist >> $scriptlog 2>&1 87 70 88 71 # retrieve sequences from todofile … … 91 74 then 92 75 echo "nothing to do -> exit" >> $scriptlog 2>&1 93 rm -v $todofile >> $scriptlog 2>&1 94 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit 76 finish >> $scriptlog 2>&1 97 77 fi 98 78 … … 105 85 var1=$no 106 86 var2=$no2 107 outpath=$logpath/$program/$no 108 echo "outpath: "$outpath >> $scriptlog 2>&1 87 checkfileavailpath=$logpath/$program/$no 109 88 makedir $outpath >> $scriptlog 2>&1 89 checkfileavaillog=$checkfileavailpath/$program-$sequence.log 110 90 111 91 sequencefile=$sequpath/$no/sequence$no2.txt … … 114 94 setstatus "start" >> $scriptlog 2>&1 115 95 116 check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $ outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`96 check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $checkfileavaillog | grep int | sed -e 's/(int)//'` 117 97 118 98 case $check1 in … … 128 108 done 129 109 130 rm -v $todofile >> $scriptlog 2>&1 131 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 110 finish >> $scriptlog 2>&1 132 111 133 date >> $scriptlog 2>&1134 -
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7471 r7476 43 43 table=DataSetProcessStatus 44 44 column=fStarFilesAvail 45 date=NULL46 datetime=`date +%F-%H-%M-%S`47 year=`date +%Y`48 45 49 46 todofile=$listpath/ToDo-$table-$column.txt 50 getstatuslogpath=$logpath/getstatus/$program/$year 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 47 lockfile=$lockpath/lock-$program.txt 52 48 53 49 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 57 53 date >> $scriptlog 2>&1 58 54 59 makedir $getstatuslogpath >> $scriptlog 2>&160 61 55 cd $mars 62 56 63 57 # check if script is already running 64 date > $lock path/lock-$program.txt>> $scriptlog 2>&158 date > $lockfile >> $scriptlog 2>&1 65 59 checklock0=$? 66 60 case $checklock0 in … … 74 68 75 69 # get todo list 76 echo "getting list..." >> $scriptlog 2>&1 77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 78 79 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;; 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 date >> $scriptlog 2>&1 85 exit;; 86 esac 70 getdolist >> $scriptlog 2>&1 87 71 88 72 datasets=(`cat $todofile`) … … 90 74 then 91 75 echo "nothing to do -> exit" >> $scriptlog 2>&1 92 rm -v $todofile >> $scriptlog 2>&1 93 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 94 date >> $scriptlog 2>&1 95 exit 76 finish >> $scriptlog 2>&1 96 77 fi 97 78 … … 142 123 done 143 124 144 rm -v $todofile >> $scriptlog 2>&1 145 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 125 finish >> $scriptlog 2>&1 146 126 147 date >> $scriptlog 2>&1148 -
trunk/MagicSoft/Mars/datacenter/scripts/copyscript
r7460 r7476 67 67 char=28 68 68 datetime=`date +%F-%H-%M-%S` 69 lockfile=$lockpath/lock-copyscript.txt 69 70 70 71 scriptlogpath=$logpath/run/copyscript/`date +%Y/%m/%d` … … 76 77 77 78 # check if the script is already running 78 date > $lock path/lock-copyscript.txt>> $scriptlog 2>&179 date > $lockfile >> $scriptlog 2>&1 79 80 checklock0=$? 80 81 case $checklock0 in … … 95 96 then 96 97 echo "couldn't create checkfile -> exit script" >> $scriptlog 2>&1 97 rm -v $lock path/lock-copyscript.txt>> $scriptlog 2>&198 rm -v $lockfile >> $scriptlog 2>&1 98 99 date >> $scriptlog 2>&1 99 100 exit … … 113 114 then 114 115 echo "nothing to do -> exit" >> $scriptlog 2>&1 115 rm -v $lock path/lock-copyscript.txt>> $scriptlog 2>&1116 rm -v $lockfile >> $scriptlog 2>&1 116 117 date >> $scriptlog 2>&1 117 118 exit … … 292 293 293 294 294 rm -v $lock path/lock-copyscript.txt>> $scriptlog 2>&1295 rm -v $lockfile >> $scriptlog 2>&1 295 296 date >> $scriptlog 2>&1 296 297 -
trunk/MagicSoft/Mars/datacenter/scripts/correcttime
r7471 r7476 44 44 table=RunProcessStatus 45 45 column=fTimingCorrection 46 date=NULL47 datetime=`date +%F_%T`48 year=`date +%Y`49 46 50 getstatuslogpath=$logpath/getstatus/$program/$year 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 52 makedir $getstatuslogpath >> $scriptlog 2>&1 47 todofile=$listpath/ToDo-$table-$column.txt 48 lockfile=$lockpath/lock-$program.txt 53 49 54 if [ -e $ listpath/ToDo-$table-$column.txt]50 if [ -e $todofile ] 55 51 then 56 52 echo "$program is already running -> exit" … … 60 56 cd $mars 61 57 62 echo "getting list..." 63 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 64 65 case $check0 in 66 1) echo "check0=$check0 -> everything ok -> run $program";; 67 *) echo "check0=$check0 -> ERROR -> step has to be repeated";; 68 esac 58 # get todo list 59 getdolist >> $scriptlog 2>&1 69 60 70 61 # retrieving runs from todo file … … 73 64 then 74 65 echo "nothing to do -> exit" 75 rm -v $listpath/ToDo-$table-$column.txt 76 exit 66 finish >> $scriptlog 2>&1 77 67 fi 78 68 … … 114 104 done 115 105 116 rm -v $listpath/ToDo-$table-$column.txt 106 finish >> $scriptlog 2>&1 117 107 -
trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck
r7471 r7476 50 50 table=RunProcessStatus 51 51 column=fDataCheckDone 52 date=NULL53 datetime=`date +%F-%H-%M-%S`54 year=`date +%Y`55 52 56 53 todofile=$listpath/ToDo-$table-$column 57 getstatuslogpath=$logpath/getstatus/$program/$year58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log59 54 60 55 scriptlogpath=$logpath/run/$program/`date +%Y/%m` … … 63 58 64 59 date >> $scriptlog 2>&1 65 66 makedir $getstatuslogpath >> $scriptlog 2>&167 60 68 61 # check if there are already todo files … … 84 77 esac 85 78 86 echo "getting list..." >> $scriptlog 2>&1 87 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 88 89 case $check0 in 90 1) echo "check0=$check0 -> everything ok -> do $program" >> $scriptlog 2>&1;; 91 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 92 esac 79 # get todo list 80 getdolist >> $scriptlog 2>&1 81 93 82 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 83 fi … … 133 122 then 134 123 echo "nothing to do -> exit" >> $scriptlog 2>&1 135 rm -v $todofile >> $scriptlog 2>&1 136 rm -v $lockfile >> $scriptlog 2>&1 137 date >> $scriptlog 2>&1 138 exit 124 finish >> $scriptlog 2>&1 139 125 fi 140 126 … … 227 213 makedir $resetlogpath >> $scriptlog 2>&1 228 214 resetlog=$resetlogpath/reset-exclusions-$no2-$date2.log 229 echo "setstatuslogfile: $setstatuslog" >> $scriptlog 2>&1 230 231 check5=`root -q -b $macrospath/resetcolumn.C+\("\"fExclusionsDone\""\,"\"SequenceBuildStatus\""\,"\"$date2\""\,"\"$date2\""\,kFALSE\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 215 216 check5=`root -q -b $macrospath/resetcolumn.C+\("\"fExclusionsDone\""\,"\"SequenceBuildStatus\""\,"\"$date2\""\,"\"$date2\""\,kFALSE\) | tee $resetlog | grep int | sed -e 's/(int)//'` 232 217 case $check5 in 233 218 1) echo "check5=$check5 -> everything ok, fExclusions have been reset " >> $scriptlog 2>&1 … … 248 233 var1=$date 249 234 var2=$no2 250 setstatus 235 setstatus "stop" >> $scriptlog 2>&1 251 236 done 252 237 253 rm -v $todofile >> $scriptlog 2>&1 254 rm -v $lockfile >> $scriptlog 2>&1 255 256 set +C 257 258 date >> $scriptlog 2>&1 259 238 finish >> $scriptlog 2>&1 239 -
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7471 r7476 46 46 table=SequenceBuildStatus 47 47 column=fExclusionsDone 48 date=NULL49 datetime=`date +%F-%H-%M-%S`50 year=`date +%Y`51 48 52 49 todofile=$listpath/ToDo-$table-$column.txt 53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 50 lockfile=$lockpath/lock-$program.txt 55 51 56 52 scriptlogpath=$logpath/run/$program/`date +%Y/%m` … … 60 56 date >> $scriptlog 2>&1 61 57 62 makedir $getstatuslogpath >> $scriptlog 2>&163 64 58 # check if the script is already running 65 date > $lock path/lock-$program.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 74 68 esac 75 69 76 # get the todo list 77 echo "getting list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 79 80 case $check0 in 81 1) echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 83 rm -v $todofile >> $scriptlog 2>&1 84 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 85 date >> $scriptlog 2>&1 86 exit;; 87 esac 70 # get todo list 71 getdolist >> $scriptlog 2>&1 88 72 89 73 dates=(`cat $todofile`) … … 91 75 then 92 76 echo "nothing to do -> exit" >> $scriptlog 2>&1 93 rm -v $todofile >> $scriptlog 2>&1 94 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit 77 finish >> $scriptlog 2>&1 97 78 fi 98 79 … … 107 88 doexclusionspath=$logpath/$program/$year2 108 89 makedir $doexclusionspath >> $scriptlog 2>&1 90 doexclusionslog=$doexclusionspath/doexclusions-$date.log 109 91 110 92 echo "run $program..." >> $scriptlog 2>&1 111 93 setstatus "start" >> $scriptlog 2>&1 112 94 113 check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusions path/doexclusions-$date.log | grep int | sed -e 's/(int)//'`95 check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionslog | grep int | sed -e 's/(int)//'` 114 96 115 97 case $check1 in … … 124 106 done 125 107 126 rm -v $todofile >> $scriptlog 2>&1 127 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 108 finish >> $scriptlog 2>&1 128 109 129 set +C130 131 date >> $scriptlog 2>&1132 -
trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
r7471 r7476 45 45 table=SequenceProcessStatus 46 46 column=fFillCallisto 47 date=NULL48 datetime=`date +%F-%H-%M-%S`49 year=`date +%Y`50 47 51 48 todofile=$listpath/ToDo-$table-$column.txt 52 getstatuslogpath=$logpath/getstatus/$program/$year 53 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 49 lockfile=$lockpath/lock-$program.txt 54 50 55 51 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 59 55 date >> $scriptlog 2>&1 60 56 61 makedir $getstatuslogpath >> $scriptlog 2>&162 63 57 cd $mars 64 58 65 59 # check if the script is already running 66 date > $lock path/lock-$table-$column.txt>> $scriptlog 2>&160 date > $lockfile >> $scriptlog 2>&1 67 61 checklock0=$? 68 62 case $checklock0 in … … 76 70 77 71 # get todo file 78 echo "getting list..." >> $scriptlog 2>&1 79 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 80 81 case $check0 in 82 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 83 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 84 rm -v $todofile >> $scriptlog 2>&1 85 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 86 date >> $scriptlog 2>&1 87 exit;; 88 esac 72 getdolist >> $scriptlog 2>&1 89 73 90 74 sequences=(`cat $todofile`) … … 92 76 then 93 77 echo "nothing to do -> exit" >> $scriptlog 2>&1 94 rm -v $todofile >> $scriptlog 2>&1 95 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 96 date >> $scriptlog 2>&1 97 exit 78 finish >> $scriptlog 2>&1 98 79 fi 99 80 … … 142 123 done 143 124 144 rm -v $todofile >> $scriptlog 2>&1 145 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 125 finish >> $scriptlog 2>&1 146 126 147 set +C148 149 date >> $scriptlog 2>&1150 -
trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
r7471 r7476 44 44 table=DataSetProcessStatus 45 45 column=fFillGanymed 46 date=NULL47 datetime=`date +%F-%H-%M-%S`48 year=`date +%Y`49 46 50 47 todofile=$listpath/ToDo-$table-$column.txt 51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 48 lockfile=$lockpath/lock-$program.txt 53 49 54 50 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 58 54 date >> $scriptlog 2>&1 59 55 60 makedir $getstatuslogpath >> $scriptlog 2>&161 62 56 cd $mars 63 57 64 58 # check if script is already running 65 date > $lock path/lock-$table-$column.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 75 69 76 70 # get todo list 77 echo "getting list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 79 80 case $check0 in 81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 82 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 83 rm -v $todofile >> $scriptlog 2>&1 84 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 85 date >> $scriptlog 2>&1 86 exit;; 87 esac 71 getdolist >> $scriptlog 2>&1 88 72 89 73 # retrieve datasets from todo file … … 92 76 then 93 77 echo "nothing to do -> exit" >> $scriptlog 2>&1 94 rm -v $todofile >> $scriptlog 2>&1 95 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 96 date >> $scriptlog 2>&1 97 exit 78 finish >> $scriptlog 2>&1 98 79 fi 99 80 … … 128 109 done 129 110 130 rm -v $todofile >> $scriptlog 2>&1 131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 111 finish >> $scriptlog 2>&1 132 112 133 set +C134 135 date >> $scriptlog 2>&1136 -
trunk/MagicSoft/Mars/datacenter/scripts/fillstar
r7471 r7476 44 44 table=SequenceProcessStatus 45 45 column=fFillStar 46 date=NULL47 datetime=`date +%F-%H-%M-%S`48 year=`date +%Y`49 46 50 47 todofile=$listpath/ToDo-$table-$column.txt 51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 48 lockfile=$lockpath/lock-$program.txt 53 49 54 50 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 58 54 date >> $scriptlog 2>&1 59 55 60 makedir $getstatuslogpath >> $scriptlog 2>&161 62 56 cd $mars 63 57 64 58 # check if the script is already running 65 date > $lock path/lock-$table-$column.txt>> $scriptlog 2>&159 date > $lockfile >> $scriptlog 2>&1 66 60 checklock0=$? 67 61 case $checklock0 in … … 75 69 76 70 # get todo list 77 echo "getting list..." >> $scriptlog 2>&1 78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 71 getdolist >> $scriptlog 2>&1 79 72 80 case $check0 in81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;82 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&183 rm -v $todofile >> $scriptlog 2>&184 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&185 date >> $scriptlog 2>&186 exit;;87 esac88 73 89 74 # retrieve sequences from todo file … … 92 77 then 93 78 echo "nothing to do -> exit" >> $scriptlog 2>&1 94 rm -v $todofile >> $scriptlog 2>&1 95 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 96 date >> $scriptlog 2>&1 97 exit 79 finish >> $scriptlog 2>&1 98 80 fi 99 81 … … 128 110 done 129 111 130 rm -v $todofile >> $scriptlog 2>&1 131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1 112 finish >> $scriptlog 2>&1 132 113 133 set +C134 135 date >> $scriptlog 2>&1136 -
trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
r7475 r7476 53 53 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 54 54 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 55 echo "-> getting list forinsertdatasets is running -> exit" >> $scriptlog 2>&155 echo "-> insertdatasets is running -> exit" >> $scriptlog 2>&1 56 56 date >> $scriptlog 2>&1 57 57 exit;; -
trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
r7460 r7476 54 54 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 55 55 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 56 echo "-> getting list for callistois running -> exit" >> $scriptlog 2>&156 echo "-> makecallistolinks is running -> exit" >> $scriptlog 2>&1 57 57 date >> $scriptlog 2>&1 58 58 exit;;
Note:
See TracChangeset
for help on using the changeset viewer.