- Timestamp:
- 02/03/06 16:49:10 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7475 r7477 18 18 19 19 -*-*- END OF LINE -*-*- 20 2006/02/03 Daniela Dorner 21 22 * datacenter/scripts/sourcefile: 23 - implemented two new functions: getdolist, finish 24 25 * datacenter/scripts/buildsequenceentries, checkfilesforsequenceavail, 26 checkstardone, copyscript, correcttime, dodatacheck, doexclusions, 27 fillcallisto, fillganymed, fillstar, insertdatasets, 28 makecallistolinks, processmcsequences, runcallisto, runganymed, 29 runstar, writesequencefiles: 30 - replaced corresponding pieces of code by the functions getdolist 31 and finish 32 - moved variable $date to function getstatus 33 - improved logging 34 - generalized variables $lockfile and $todofile 35 36 20 37 2006/02/03 Daniela Dorner, Daniel Hoehne 21 38 -
trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
r7476 r7477 34 34 35 35 user=`whoami` 36 program=makecallistolinks 36 37 source /home/$user/Mars/datacenter/scripts/sourcefile 37 38 … … 41 42 callistorcnew=callisto_Dec04Jan05.rc 42 43 43 scriptlogpath=$logpath/run/ makecallistolinks/`date +%Y/%m/%d`44 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` 44 45 makedir $scriptlogpath 45 scriptlog=$scriptlogpath/ makingcallistolinks`date +%F`.log46 scriptlog=$scriptlogpath/$program`date +%F`.log 46 47 47 48 date >> $scriptlog 2>&1 48 49 49 50 # check if script is already running 50 lockfile=$lockpath/lock- making-callisto-links.txt51 lockfile=$lockpath/lock-$program.txt 51 52 date > $lockfile >> $scriptlog 2>&1 52 53 checklock0=$? … … 54 55 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 55 56 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 56 echo "-> makecallistolinksis running -> exit" >> $scriptlog 2>&157 echo "-> $program is running -> exit" >> $scriptlog 2>&1 57 58 date >> $scriptlog 2>&1 58 59 exit;; -
trunk/MagicSoft/Mars/datacenter/scripts/processmcsequences
r7460 r7477 50 50 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 51 51 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 52 echo "-> linkmcis running -> exit" >> $scriptlog 2>&152 echo "-> processmcsequences is running -> exit" >> $scriptlog 2>&1 53 53 date >> $scriptlog 2>&1 54 54 exit;; -
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7474 r7477 49 49 table=SequenceProcessStatus 50 50 column=fCallisto 51 date=NULL52 datetime=`date +%F-%H-%M-%S`53 year=`date +%Y`54 51 #pno=500 # number of processes, i.e. number of todo-files 55 52 56 53 todofile=$listpath/ToDo-$table-$column 57 getstatuslogpath=$logpath/getstatus/$program/$year 58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 lockfile=$lockpath/lock-getting-$program-list.txt 59 55 60 56 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 64 60 date >> $scriptlog 2>&1 65 61 66 makedir $getstatuslogpath >> $scriptlog 2>&167 68 62 cd $mars 63 64 # check if getting of list is already running 65 date > $lockfile >> $scriptlog 2>&1 66 checklock0=$? 67 case $checklock0 in 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 70 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 71 date >> $scriptlog 2>&1 72 exit;; 73 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 74 esac 69 75 70 76 # get todo file … … 75 81 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 76 82 else 77 date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 78 checklock0=$? 79 case $checklock0 in 80 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 81 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 82 echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1 83 date >> $scriptlog 2>&1 84 exit;; 85 *) echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;; 86 esac 87 88 echo "getting list..." >> $scriptlog 2>&1 89 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 90 91 case $check0 in 92 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 93 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 95 date >> $scriptlog 2>&1 96 exit;; 97 esac 98 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1 83 # get todo list 84 getdolist >> $scriptlog 2>&1 85 rm -v $lockfile >> $scriptlog 2>&1 99 86 fi 100 87 … … 135 122 then 136 123 echo "nothing to do -> exit" >> $scriptlog 2>&1 137 rm -v $todofile >> $scriptlog 2>&1 138 rm -v $lockfile >> $scriptlog 2>&1 139 date >> $scriptlog 2>&1 140 exit 124 finish >> $scriptlog 2>&1 141 125 fi 142 126 … … 272 256 done 273 257 274 rm -v $todofile >> $scriptlog 2>&1 275 rm -v $lockfile >> $scriptlog 2>&1 276 277 set +C 278 279 date >> $scriptlog 2>&1 280 258 finish >> $scriptlog 2>&1 259 -
trunk/MagicSoft/Mars/datacenter/scripts/runganymed
r7469 r7477 45 45 table=DataSetProcessStatus 46 46 column=fGanymed 47 date=NULL48 datetime=`date +%F-%H-%M-%S`49 year=`date +%Y`50 47 #pno=24 # number of processes, i.e. number of todo-files 51 48 52 49 todofile=$listpath/ToDo-$table-$column 53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 50 lockfile=$lockpath/lock-getting-$program-list.txt 55 51 56 52 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 60 56 date >> $scriptlog 2>&1 61 57 62 makedir $getstatuslogpath >> $scriptlog 2>&163 64 58 cd $mars 65 59 66 60 # check if getting of list is already running 67 date > $lock path/lock-getting-$program-list.txt>> $scriptlog 2>&161 date > $lockfile >> $scriptlog 2>&1 68 62 checklock0=$? 69 63 case $checklock0 in … … 83 77 echo " -> choose one file and run $program" >> $scriptlog 2>&1 84 78 else 85 echo "getting list..." >> $scriptlog 2>&1 86 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 87 88 case $check0 in 89 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 90 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 91 esac 79 # get todo list 80 getdolist >> $scriptlog 2>&1 81 rm -v $lockfile >> $scriptlog 2>&1 92 82 fi 93 94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&195 83 96 84 # choosing todo file … … 130 118 then 131 119 echo "nothing to do -> exit" >> $scriptlog 2>&1 132 rm -v $todofile >> $scriptlog 2>&1 133 rm -v $lockfile >> $scriptlog 2>&1 134 date >> $scriptlog 2>&1 135 exit 120 finish >> $scriptlog 2>&1 136 121 fi 137 122 … … 178 163 done 179 164 180 rm -v $todofile >> $scriptlog 2>&1 181 rm -v $lockfile >> $scriptlog 2>&1 165 finish >> $scriptlog 2>&1 182 166 183 set +C184 185 date >> $scriptlog 2>&1186 -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r7469 r7477 45 45 table=SequenceProcessStatus 46 46 column=fStar 47 date=NULL48 datetime=`date +%F-%H-%M-%S`49 year=`date +%Y`50 47 #pno=500 # number of processes, i.e. number of todo-files 51 48 52 49 todofile=$listpath/ToDo-$table-$column 53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 50 lockfile=$lockpath/lock-getting-$program-list.txt 55 51 56 52 scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d` … … 60 56 date >> $scriptlog 2>&1 61 57 62 makedir $getstatuslogpath >> $scriptlog 2>&163 64 58 cd $mars 65 59 66 60 # check if getting of list is already running 67 date > $lock path/lock-getting-$program-list.txt>> $scriptlog 2>&161 date > $lockfile >> $scriptlog 2>&1 68 62 checklock0=$? 69 63 case $checklock0 in … … 83 77 echo " -> choose one file and start calculation of image parameter" >> $scriptlog 2>&1 84 78 else 85 echo "getting list..." >> $scriptlog 2>&1 86 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 87 88 case $check0 in 89 1) echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;; 90 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 91 esac 79 # get todo list 80 getdolist >> $scriptlog 2>&1 81 rm -v $lockfile >> $scriptlog 2>&1 92 82 fi 93 94 rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&195 83 96 84 # choosing todo file … … 130 118 then 131 119 echo "nothing to do -> exit" >> $scriptlog 2>&1 132 rm -v $todofile >> $scriptlog 2>&1 133 rm -v $lockfile >> $scriptlog 2>&1 134 date >> $scriptlog 2>&1 135 exit 120 finish >> $scriptlog 2>&1 136 121 fi 137 122 … … 170 155 done 171 156 172 rm -v $todofile >> $scriptlog 2>&1 173 rm -v $lockfile >> $scriptlog 2>&1 157 finish >> $scriptlog 2>&1 174 158 175 set +C176 177 date >> $scriptlog 2>&1178 -
trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
r7474 r7477 63 63 } 64 64 65 function finish() 66 { 67 rm -v $todofile 68 rm -v $lockfile 69 date 70 exit 71 } 72 73 function getdolist() 74 { 75 datetime=`date +%F-%H-%M-%S` 76 year=`date +%Y` 77 date=NULL 78 79 getstatuslogpath=$logpath/getstatus/$program/$year 80 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log 81 makedir $getstatuslogpath 82 83 # get todo list 84 echo "getting todo list..." 85 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus | grep int | sed -e 's/(int)//'` 86 87 case $check0 in 88 1) echo "check0=$check0 -> everything ok, got todo list -> run $program";; 89 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" 90 finish ;; 91 esac 92 93 } 94 65 95 function resetstatusvalues() 66 96 { … … 118 148 case $checkstatus in 119 149 1) echo "checkstatus=$checkstatus -> everything ok, status has been set";; 120 *) echo "checkstatus=$checkstatus -> ERROR -> step could not be set";; 150 *) echo "checkstatus=$checkstatus -> ERROR -> step could not be set -> exit" 151 finish ;; 121 152 esac 122 153 } -
trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
r7471 r7477 44 44 table=SequenceProcessStatus 45 45 column=fSequenceFileWritten 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 todo 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 # get sequences 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 … … 110 91 111 92 writesequencefilelogpath=$logpath/$program/$no 112 echo "$programlogpath: "$writesequencefilelogpath >> $scriptlog 2>&1113 93 makedir $writesequencefilelogpath >> $scriptlog 2>&1 94 writesequencefilelog=$writesequencefilelogpath/writesequencefile-$no2.log 114 95 115 96 echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1 116 97 setstatus "start" >> $scriptlog 2>&1 117 98 118 check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog path/writesequencefile-$no2.log| grep int | sed -e 's/(int)//'`99 check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog | grep int | sed -e 's/(int)//'` 119 100 case $check2 in 120 101 1) echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;; … … 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
Note:
See TracChangeset
for help on using the changeset viewer.