Changeset 7465 for trunk/MagicSoft
- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7460 r7465 37 37 38 38 user=`whoami` 39 program=buildsequenceentries 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column.txt 52 getstatuslogpath=$logpath/getstatus/ buildsequenceentries/$year53 getstatuslog=$getstatuslogpath/getstatus- buildsequenceentries-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ buildsequenceentries/`date +%Y/%m`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/ buildsequenceentries-$datetime.log58 scriptlog=$scriptlogpath/$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 62 63 63 64 # check if script is already running 64 date > $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&165 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 65 66 checklock0=$? 66 67 case $checklock0 in 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> buildsequenceentriesis running -> exit" >> $scriptlog 2>&170 echo "-> $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 81 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&184 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 85 date >> $scriptlog 2>&1 85 86 exit;; … … 92 93 echo "nothing to do -> exit" >> $scriptlog 2>&1 93 94 rm -v $todofile >> $scriptlog 2>&1 94 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&195 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 95 96 date >> $scriptlog 2>&1 96 97 exit … … 102 103 echo "building sequence entries for date $date..." >> $scriptlog 2>&1 103 104 year2=`echo $date | cut -c 1-4` 104 buildsequentriespath=$logpath/ buildsequenceentries/$year2105 buildsequentriespath=$logpath/$program/$year2 105 106 makedir $buildsequentriespath >> $scriptlog 2>&1 106 107 … … 109 110 case $check1 in 110 111 1) echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1 111 setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2 112 makedir $setstatuslogpath >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'` 115 case $check2 in 116 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;; 117 *) echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;; 118 esac 112 statustime="Now()" 113 failed="NULL" 114 starttime="NULL" 115 failedtime="NULL" 116 var1=$year2 117 var2=$date 118 setstatus 119 119 ;; 120 *) echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;120 *) echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;; 121 121 esac 122 122 done 123 123 124 124 rm -v $todofile >> $scriptlog 2>&1 125 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&1125 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 126 126 127 127 set +C -
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r7460 r7465 37 37 38 38 user=`whoami` 39 program=checkfileavail 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 46 47 47 48 todofile=$listpath/ToDo-$table-$column.txt 48 getstatuslogpath=$logpath/getstatus/ checkfileavail/$year49 getstatuslogpath=$logpath/getstatus/$program/$year 49 50 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 50 51 … … 61 62 62 63 # check if script is already running 63 date > $lockpath/lock- checkfileavail.txt >> $scriptlog 2>&164 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 64 65 checklock0=$? 65 66 case $checklock0 in 66 67 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 68 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkfileavailis running -> exit" >> $scriptlog 2>&169 echo "-> $program is running -> exit" >> $scriptlog 2>&1 69 70 date >> $scriptlog 2>&1 70 71 exit;; … … 80 81 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 81 82 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock- checkfileavail.txt >> $scriptlog 2>&183 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 83 84 date >> $scriptlog 2>&1 84 85 exit;; … … 91 92 echo "nothing to do -> exit" >> $scriptlog 2>&1 92 93 rm -v $todofile >> $scriptlog 2>&1 93 rm -v $lockpath/lock- checkfileavail.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 94 95 date >> $scriptlog 2>&1 95 96 exit … … 102 103 no=`printf %08d $sequence | cut -c 0-4` 103 104 no2=`printf %08d $sequence` 104 outpath=$logpath/ checkfileavail/$no105 outpath=$logpath/$program/$no 105 106 echo "outpath: "$outpath >> $scriptlog 2>&1 106 107 makedir $outpath >> $scriptlog 2>&1 … … 112 113 case $check1 in 113 114 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 114 setstatuslogpath=$logpath/setstatus/checkfileavail/$no 115 makedir $setstatuslogpath >> $scriptlog 2>&1 116 117 check2=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'` 118 case $check2 in 119 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;; 120 *) echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;; 121 esac 115 statustime="Now()" 116 failed="NULL" 117 starttime="NULL" 118 failedtime="NULL" 119 var1=$no 120 var2=$sequence 121 setstatus 122 122 ;; 123 123 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; … … 126 126 127 127 rm -v $todofile >> $scriptlog 2>&1 128 rm -v $lockpath/lock- checkfileavail.txt >> $scriptlog 2>&1128 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 129 129 130 130 date >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7460 r7465 38 38 39 39 user=`whoami` 40 program=checkstardone 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 47 48 48 49 todofile=$listpath/ToDo-$table-$column.txt 49 getstatuslogpath=$logpath/getstatus/ checkstardone/$year50 getstatuslogpath=$logpath/getstatus/$program/$year 50 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 51 52 52 scriptlogpath=$logpath/run/ checkstardone/`date +%Y/%m/%d`53 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 53 54 makedir $scriptlogpath 54 scriptlog=$scriptlogpath/ checkstardone-$datetime.log55 scriptlog=$scriptlogpath/$program-$datetime.log 55 56 56 57 date >> $scriptlog 2>&1 … … 61 62 62 63 # check if script is already running 63 date > $lockpath/lock- checkstardone.txt >> $scriptlog 2>&164 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 64 65 checklock0=$? 65 66 case $checklock0 in 66 67 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 67 68 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 68 echo "-> checkstardoneis running -> exit" >> $scriptlog 2>&169 echo "-> $program is running -> exit" >> $scriptlog 2>&1 69 70 date >> $scriptlog 2>&1 70 71 exit;; … … 80 81 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 81 82 rm -v $todofile >> $scriptlog 2>&1 82 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&183 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 83 84 date >> $scriptlog 2>&1 84 85 exit;; … … 90 91 echo "nothing to do -> exit" >> $scriptlog 2>&1 91 92 rm -v $todofile >> $scriptlog 2>&1 92 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&193 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 93 94 date >> $scriptlog 2>&1 94 95 exit … … 112 113 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 113 114 114 outpath=$logpath/ checkstardone/$no115 outpath=$logpath/$program/$no 115 116 echo "outpath: "$outpath >> $scriptlog 2>&1 116 117 makedir $outpath >> $scriptlog 2>&1 … … 129 130 done 130 131 131 setstatuslogpath=$logpath/setstatus/checkstardone/$no 132 makedir $setstatuslogpath >> $scriptlog 2>&1 133 134 check2=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-checkstardone-$dataset.log | grep int | sed -e 's/(int)//'` 135 case $check2 in 136 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;; 137 *) echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;; 138 esac 132 statustime="Now()" 133 failed="NULL" 134 starttime="NULL" 135 failedtime="NULL" 136 var1=$no 137 var2=$dataset 138 setstatus 139 139 done 140 140 141 141 rm -v $todofile >> $scriptlog 2>&1 142 rm -v $lockpath/lock- checkstardone.txt >> $scriptlog 2>&1142 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 143 143 144 144 date >> $scriptlog 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/correcttime
r7460 r7465 39 39 40 40 user=`whoami` 41 program=correct_raw_time 41 42 source /home/$user/Mars/datacenter/scripts/sourcefile 42 43 … … 47 48 year=`date +%Y` 48 49 49 getstatuslogpath=$logpath/getstatus/ correct_raw_time/$year50 getstatuslogpath=$logpath/getstatus/$program/$year 50 51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 51 52 makedir $getstatuslogpath >> $scriptlog 2>&1 … … 53 54 if [ -e $listpath/ToDo-$table-$column.txt ] 54 55 then 55 echo " correct_raw_timeis already running -> exit"56 echo "$program is already running -> exit" 56 57 exit 57 58 fi … … 63 64 64 65 case $check0 in 65 1) echo "check0=$check0 -> everything ok -> run correct_raw_time";;66 1) echo "check0=$check0 -> everything ok -> run $program";; 66 67 *) echo "check0=$check0 -> ERROR -> step has to be repeated";; 67 68 esac … … 93 94 94 95 check1=0 95 echo "run correct_raw_time..."96 /home/tape/MagicReadout/correct_raw_time $infile $outfile > $timecorrpath/ correct_raw_time-$run.log96 echo "run $program..." 97 /home/tape/MagicReadout/correct_raw_time $infile $outfile > $timecorrpath/$program-$run.log 97 98 check1=$? 98 99 … … 100 101 1) echo "check1=$check1 -> everything ok -> setting status..." 101 102 no=`printf %08d $run | cut -c 1-5` 102 setstatuspath=$logpath/setstatus/correct_raw_time/$no 103 echo "setstatuspath: "$setstatuspath 104 makedir $setstatuspath 105 106 check2=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuspath/setstatus-correct_raw_time-$run.log | grep int | sed -e 's/(int)//'` 107 case $check2 in 108 0) echo "check2=0 -> ERROR -> step could not be set";; 109 1) echo "check2=1 -> everything ok, status has been set";; 110 esac 103 statustime="Now()" 104 failed="NULL" 105 starttime="NULL" 106 failedtime="NULL" 107 var1=$no 108 var2=$run 109 setstatus 111 110 ;; 112 111 *) echo "check1=$check1 -> ERROR -> step has to be repeated";; -
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 -
trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
r7460 r7465 37 37 38 38 user=`whoami` 39 program=doexclusions 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column.txt 52 getstatuslogpath=$logpath/getstatus/ doexclusions/$year53 getstatuslog=$getstatuslogpath/getstatus- doexclusions-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ doexclusions/`date +%Y/%m`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/ doexclusions-$datetime.log58 scriptlog=$scriptlogpath/$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 62 63 63 64 # check if the script is already running 64 date > $lockpath/lock- doexclusions.txt >> $scriptlog 2>&165 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 65 66 checklock0=$? 66 67 case $checklock0 in 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> getting list for doexclusionsis running -> exit" >> $scriptlog 2>&170 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 81 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&184 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 85 date >> $scriptlog 2>&1 85 86 exit;; … … 91 92 echo "nothing to do -> exit" >> $scriptlog 2>&1 92 93 rm -v $todofile >> $scriptlog 2>&1 93 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 94 95 date >> $scriptlog 2>&1 95 96 exit … … 102 103 echo "do exclusions for date "$date >> $scriptlog 2>&1 103 104 year2=`echo $date | cut -c 1-4` 104 doexclusionspath=$logpath/ doexclusions/$year2105 doexclusionspath=$logpath/$program/$year2 105 106 makedir $doexclusionspath >> $scriptlog 2>&1 106 107 … … 109 110 case $check1 in 110 111 1) echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 111 setstatuslogpath=$logpath/setstatus/doexclusions/$year2 112 makedir $setstatuslogpath >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-doexclusions-$date.log | grep int | sed -e 's/(int)//'` 115 116 case $check2 in 117 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;; 118 *) echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;; 119 esac 112 statustime="Now()" 113 failed="NULL" 114 starttime="NULL" 115 failedtime="NULL" 116 var1=$year2 117 var2=$date 118 setstatus 120 119 ;; 121 120 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;; … … 124 123 125 124 rm -v $todofile >> $scriptlog 2>&1 126 rm -v $lockpath/lock- doexclusions.txt >> $scriptlog 2>&1125 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 127 126 128 127 set +C -
trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
r7460 r7465 38 38 39 39 user=`whoami` 40 program=fillcallisto 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 49 50 50 51 todofile=$listpath/ToDo-$table-$column.txt 51 getstatuslogpath=$logpath/getstatus/ fillcallisto/$year52 getstatuslog=$getstatuslogpath/getstatus- fillcallisto-$datetime.log52 getstatuslogpath=$logpath/getstatus/$program/$year 53 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 53 54 54 scriptlogpath=$logpath/run/ fillcallisto/`date +%Y/%m/%d`55 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 55 56 makedir $scriptlogpath 56 scriptlog=$scriptlogpath/run fillcallisto-$datetime.log57 scriptlog=$scriptlogpath/run$program-$datetime.log 57 58 58 59 date >> $scriptlog 2>&1 … … 68 69 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 69 70 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 70 echo "-> fillcallistois running -> exit" >> $scriptlog 2>&171 echo "-> $program is running -> exit" >> $scriptlog 2>&1 71 72 date >> $scriptlog 2>&1 72 73 exit;; … … 79 80 80 81 case $check0 in 81 1) echo "check0=$check0 -> everything ok -> run fillcallisto" >> $scriptlog 2>&1;;82 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 82 83 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 83 84 rm -v $todofile >> $scriptlog 2>&1 … … 106 107 signalfile=$path/signal$no2.root 107 108 calibfile=$path/calib$no2.root 108 fillcallistologpath=$logpath/ fillcallisto/$no109 echo " fillcallistologpath: "$fillcallistologpath >> $scriptlog 2>&1109 fillcallistologpath=$logpath/$program/$no 110 echo "$programlogpath: "$fillcallistologpath >> $scriptlog 2>&1 110 111 makedir $fillcallistologpath >> $scriptlog 2>&1 111 112 fillcaliblog=$fillcallistologpath/fillcalib-$sequence.log 112 113 fillsignallog=$fillcallistologpath/fillsignal-$sequence.log 113 114 114 echo "run fillcallistofor sequence $sequence" >> $scriptlog 2>&1115 echo "run $program for sequence $sequence" >> $scriptlog 2>&1 115 116 echo "run fillcalib..." >> $scriptlog 2>&1 116 117 check1=`root -q -b $macrospath/fillcalib.C+\("\"$calibfile\""\,kFALSE\) | tee $fillcaliblog | grep int | sed -e 's/(int)//'` … … 125 126 case $check2 in 126 127 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 127 echo "-> inserting the status for fillcallisto for sequence $sequence into the db" >> $scriptlog 2>&1 128 setstatuslogpath=$logpath/setstatus/fillcallisto/$no 129 makedir $setstatuslogpath >> $scriptlog 2>&1 130 setstatuslog=$setstatuslogpath/setstatus-fillcallisto 131 132 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'` 133 case $check4 in 134 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 135 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 136 esac 128 echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 129 statustime="Now()" 130 failed="NULL" 131 starttime="NULL" 132 failedtime="NULL" 133 var1=$no 134 var2=$sequence 135 setstatus 137 136 ;; 138 137 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
r7460 r7465 37 37 38 38 user=`whoami` 39 program=fillganymed 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 48 49 49 50 todofile=$listpath/ToDo-$table-$column.txt 50 getstatuslogpath=$logpath/getstatus/ fillganymws/$year51 getstatuslog=$getstatuslogpath/getstatus- fillganymed-$datetime.log51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 52 53 53 scriptlogpath=$logpath/run/ fillganymed/`date +%Y/%m/%d`54 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 54 55 makedir $scriptlogpath 55 scriptlog=$scriptlogpath/run fillganymed-$datetime.log56 scriptlog=$scriptlogpath/run$program-$datetime.log 56 57 57 58 date >> $scriptlog 2>&1 … … 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> fillganymedis running -> exit" >> $scriptlog 2>&170 echo "-> $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 78 79 79 80 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> run fillganymed" >> $scriptlog 2>&1;;81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 81 82 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 … … 105 106 path="$datapath/ganymed/$no/$no2" 106 107 ganymedfile=$path/ganymed$no2.root 107 fillganymedlogpath=$logpath/ fillganymed/$no108 echo " fillganymedlogpath: "$fillganymedlogpath >> $scriptlog 2>&1108 fillganymedlogpath=$logpath/$program/$no 109 echo "$programlogpath: "$fillganymedlogpath >> $scriptlog 2>&1 109 110 makedir $fillganymedlogpath >> $scriptlog 2>&1 110 fillganymedlog=$fillganymedlogpath/ fillganymed-$dataset.log111 fillganymedlog=$fillganymedlogpath/$program-$dataset.log 111 112 112 echo "run fillganymedfor dataset $dataset" >> $scriptlog 2>&1113 echo "run $program for dataset $dataset" >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/fillganymed.C+\("\"$ganymedfile\""\,kFALSE\) | tee $fillganymedlog | grep int | sed -e 's/(int)//'` 114 115 case $check2 in 115 116 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 116 echo "-> inserting the status for fillganymed for dataset $dataset into the db" >> $scriptlog 2>&1 117 setstatuslogpath=$logpath/setstatus/fillganymed/$no 118 makedir $setstatuslogpath >> $scriptlog 2>&1 119 setstatuslog=$setstatuslogpath/setstatus-fillganymed-$no2.log 120 121 check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 122 case $check4 in 123 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 124 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 125 esac 117 echo "-> inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1 118 statustime="Now()" 119 failed="NULL" 120 starttime="NULL" 121 failedtime="NULL" 122 var1=$no 123 var2=$no2 124 setstatus 126 125 ;; 127 126 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/fillstar
r7460 r7465 37 37 38 38 user=`whoami` 39 program=fillstar 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 48 49 49 50 todofile=$listpath/ToDo-$table-$column.txt 50 getstatuslogpath=$logpath/getstatus/ fillstar/$year51 getstatuslog=$getstatuslogpath/getstatus- fillstar-$datetime.log51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 52 53 53 scriptlogpath=$logpath/run/ fillstar/`date +%Y/%m/%d`54 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 54 55 makedir $scriptlogpath 55 scriptlog=$scriptlogpath/run fillstar-$datetime.log56 scriptlog=$scriptlogpath/run$program-$datetime.log 56 57 57 58 date >> $scriptlog 2>&1 … … 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> fillstaris running -> exit" >> $scriptlog 2>&170 echo "-> $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 78 79 79 80 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> run fillstar" >> $scriptlog 2>&1;;81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 81 82 *) echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 … … 105 106 path="$datapath/star/$no/$no2" 106 107 starfile=$path/star$no2.root 107 fillstarlogpath=$logpath/ fillstar/$no108 echo " fillstarlogpath: "$fillstarlogpath >> $scriptlog 2>&1108 fillstarlogpath=$logpath/$program/$no 109 echo "$programlogpath: "$fillstarlogpath >> $scriptlog 2>&1 109 110 makedir $fillstarlogpath >> $scriptlog 2>&1 110 fillstarlog=$fillstarlogpath/ fillstar-$sequence.log111 fillstarlog=$fillstarlogpath/$program-$sequence.log 111 112 112 echo "run fillstarfor sequence $sequence" >> $scriptlog 2>&1113 echo "run $program for sequence $sequence" >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/fillstar.C+\("\"$starfile\""\,kFALSE\) | tee $fillstarlog | grep int | sed -e 's/(int)//'` 114 115 case $check2 in 115 116 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 116 echo "-> inserting the status for fillstar for sequence $sequence into the db" >> $scriptlog 2>&1 117 setstatuslogpath=$logpath/setstatus/fillstar/$no 118 makedir $setstatuslogpath >> $scriptlog 2>&1 119 setstatuslog=$setstatuslogpath/setstatus-fillstar-$no2.log 120 121 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 122 case $check4 in 123 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 124 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 125 esac 117 echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 118 statustime="Now()" 119 failed="NULL" 120 starttime="NULL" 121 failedtime="NULL" 122 var1=$no 123 var2=$no2 124 setstatus 126 125 ;; 127 126 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7460 r7465 38 38 39 39 user=`whoami` 40 program=callisto 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 43 44 44 45 # define callisto.rc files 45 callistorcnew=$setuppath/ callisto/callisto.rc46 callistorcmarapr05=$setuppath/ callisto/callisto_MarApr05.rc46 callistorcnew=$setuppath/$program/$program.rc 47 callistorcmarapr05=$setuppath/$program/$program_MarApr05.rc 47 48 48 49 table=SequenceProcessStatus … … 54 55 55 56 todofile=$listpath/ToDo-$table-$column 56 getstatuslogpath=$logpath/getstatus/ callisto/$year57 getstatuslog=$getstatuslogpath/getstatus- callisto-$datetime.log58 59 scriptlogpath=$logpath/run/ callisto/`date +%Y/%m/%d`57 getstatuslogpath=$logpath/getstatus/$program/$year 58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 59 60 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 60 61 makedir $scriptlogpath 61 scriptlog=$scriptlogpath/run callisto-$datetime.log62 scriptlog=$scriptlogpath/run$program-$datetime.log 62 63 63 64 date >> $scriptlog 2>&1 … … 74 75 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 75 76 else 76 date > $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&177 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 77 78 checklock0=$? 78 79 case $checklock0 in 79 80 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 80 81 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 81 echo "-> getting list for callistois running -> exit" >> $scriptlog 2>&182 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 82 83 date >> $scriptlog 2>&1 83 84 exit;; … … 89 90 90 91 case $check0 in 91 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;;92 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 92 93 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 93 rm -v $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 95 date >> $scriptlog 2>&1 95 96 exit;; 96 97 esac 97 rm -v $lockpath/lock-getting- callisto-list.txt >> $scriptlog 2>&198 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 98 99 fi 99 100 … … 146 147 no=`printf %08d $sequence | cut -c 0-4` 147 148 no2=`printf %08d $sequence` 148 outpath="$datapath/ callisto/$no/$no2"149 outpath="$datapath/$program/$no/$no2" 149 150 echo "outpath: "$outpath >> $scriptlog 2>&1 150 151 makedir $outpath >> $scriptlog 2>&1 … … 154 155 155 156 # find callisto.rc file 156 if [ -e $outpath/ callisto.rc ]157 if [ -e $outpath/$program.rc ] 157 158 then 158 echo "found callisto.rc in $outpath -> using this " >> $scriptlog 2>&1159 callistorcseq=$outpath/ callisto.rc159 echo "found $program.rc in $outpath -> using this " >> $scriptlog 2>&1 160 callistorcseq=$outpath/$program.rc 160 161 else 161 echo "no callisto.rc found in $outpath -> making link " >> $scriptlog 2>&1162 echo "no $program.rc found in $outpath -> making link " >> $scriptlog 2>&1 162 163 if [ 49735 -lt $sequence ] && [ $sequence -lt 53516 ] 163 164 then 164 ln -vs $callistorcmarapr05 $outpath/ callisto.rc >> $scriptlog 2>&1165 ln -vs $callistorcmarapr05 $outpath/$program.rc >> $scriptlog 2>&1 165 166 else 166 ln -vs $callistorcnew $outpath/ callisto.rc >> $scriptlog 2>&1167 ln -vs $callistorcnew $outpath/$program.rc >> $scriptlog 2>&1 167 168 fi 168 callistorcseq=$outpath/ callisto.rc169 callistorcseq=$outpath/$program.rc 169 170 fi 170 171 171 172 echo "run callisto..." >> $scriptlog 2>&1 172 ./callisto -b -q -v4 -f -raw --log=$outpath/ callisto$no2.log --html=$outpath/callisto$no2.html --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null173 ./callisto -b -q -v4 -f -raw --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath --config=$callistorcseq $sequfile 2>> $scriptlog > /dev/null 173 174 check1=$? 174 175 … … 246 247 247 248 # set status for calibration if merpp updates are also done 248 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 249 setstatuslogpath=$logpath/setstatus/callisto/$no 250 makedir $setstatuslogpath >> $scriptlog 2>&1 251 setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log 252 253 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 254 case $check4 in 255 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 256 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 257 esac 249 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 250 statustime="Now()" 251 failed="NULL" 252 starttime="NULL" 253 failedtime="NULL" 254 var1=$no 255 var2=$no2 256 setstatus 258 257 ;; 259 258 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; -
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;; -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7460 r7465 38 38 39 39 user=`whoami` 40 program=star 40 41 source /home/$user/Mars/datacenter/scripts/sourcefile 41 42 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column 52 getstatuslogpath=$logpath/getstatus/ star/$year53 getstatuslog=$getstatuslogpath/getstatus- star-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ star/`date +%Y/%m/%d`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/run star-$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- star-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 staris 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;; … … 86 87 87 88 case $check0 in 88 1) echo "check0=$check0 -> everything ok -> run star" >> $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- star-list.txt >> $scriptlog 2>&194 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 94 95 95 96 # choosing todo file … … 124 125 esac 125 126 126 127 127 # retrieve sequence from todo file 128 128 sequences=(`cat $todofile`) … … 142 142 no=`printf %08d $sequence | cut -c 0-4` 143 143 no2=`printf %08d $sequence` 144 outpath="$datapath/ star/$no/$no2"145 inpath=`echo $outpath | sed -e 's/ star/callisto/'`144 outpath="$datapath/$program/$no/$no2" 145 inpath=`echo $outpath | sed -e 's/$program/callisto/'` 146 146 echo "inpath: "$inpath >> $scriptlog 2>&1 147 147 echo "outpath: "$outpath >> $scriptlog 2>&1 … … 151 151 echo "sequfile: "$sequfile >> $scriptlog 2>&1 152 152 153 echo "run star..." >> $scriptlog 2>&1154 ./star -b -q -v4 -f --log=$outpath/ star$no2.log --html=$outpath/star$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null153 echo "run $program..." >> $scriptlog 2>&1 154 ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null 155 155 check1=$? 156 156 157 157 case $check1 in 158 158 0) echo "check1=$check1 -> everything ok " >> $scriptlog 2>&1 159 echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1 160 setstatuslogpath=$logpath/setstatus/star/$no 161 makedir $setstatuslogpath >> $scriptlog 2>&1 162 setstatuslog=$setstatuslogpath/setstatus-star-$no2.log 163 164 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 165 case $check4 in 166 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 167 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 168 esac 159 echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 160 statustime="Now()" 161 failed="NULL" 162 starttime="NULL" 163 failedtime="NULL" 164 var1=$no 165 var2=$no2 166 setstatus 169 167 ;; 170 168 *) echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7460 r7465 60 60 fi 61 61 } 62 63 function setstatus() 64 { 65 setstatuslogpath=$logpath/setstatus/$program/$var1 66 makedir $setstatuslogpath >> $scriptlog 2>&1 67 setstatuslog=$setstatuslogpath/setstatus-$program-$var2.log 68 checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$failed\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 69 case $checkstatus in 70 1) echo "checkstatus=$checkstatus -> everything ok, status has been set" >> $scriptlog 2>&1;; 71 *) echo "checkstatus=$checkstatus -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 72 esac 73 } -
trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
r7460 r7465 37 37 38 38 user=`whoami` 39 program=writesequencefile 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 48 49 49 50 todofile=$listpath/ToDo-$table-$column.txt 50 getstatuslogpath=$logpath/getstatus/ writesequencefiles/$year51 getstatuslog=$getstatuslogpath/getstatus- writesequencefiles-$datetime.log51 getstatuslogpath=$logpath/getstatus/$program/$year 52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 52 53 53 scriptlogpath=$logpath/run/ writesequencefiles/`date +%Y/%m/%d`54 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 54 55 makedir $scriptlogpath 55 scriptlog=$scriptlogpath/run writesequencefiles-$datetime.log56 scriptlog=$scriptlogpath/run$program-$datetime.log 56 57 57 58 date >> $scriptlog 2>&1 … … 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> writesequencefilesis running -> exit" >> $scriptlog 2>&170 echo "-> $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 78 79 79 80 case $check0 in 80 1) echo "check0=$check0 -> everything ok -> run writesequencefiles" >> $scriptlog 2>&1;;81 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 81 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 … … 106 107 makedir $sequencepath >> $scriptlog 2>&1 107 108 108 writesequencefilelogpath=$logpath/ writesequencefile/$no109 echo " writesequencefilelogpath: "$writesequencefilelogpath >> $scriptlog 2>&1109 writesequencefilelogpath=$logpath/$program/$no 110 echo "$programlogpath: "$writesequencefilelogpath >> $scriptlog 2>&1 110 111 makedir $writesequencefilelogpath >> $scriptlog 2>&1 111 112 … … 114 115 case $check2 in 115 116 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 116 echo "-> inserting the status for writesequencefile for sequence $sequence into the db" >> $scriptlog 2>&1 117 setstatuslogpath=$logpath/setstatus/writesequencefile/$no 118 makedir $setstatuslogpath >> $scriptlog 2>&1 119 setstatuslog=$setstatuslogpath/setstatus-writesequencefile-$no2.log 120 121 check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'` 122 case $check4 in 123 1) echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1;; 124 *) echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1;; 125 esac 117 echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1 118 statustime="Now()" 119 failed="NULL" 120 starttime="NULL" 121 failedtime="NULL" 122 var1=$no 123 var2=$no2 124 setstatus 126 125 ;; 127 126 *) echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
Note:
See TracChangeset
for help on using the changeset viewer.