- Timestamp:
- 02/19/09 21:22:19 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
r9054 r9355 42 42 set -C 43 43 44 scriptlog=$runlogpath/$program-$datetime.log45 date >> $scriptlog 2>&146 47 44 # check if script is already running 48 45 lockfile=$lockpath/lock-$program.txt 49 checklock >> $scriptlog 2>&146 checklock 50 47 51 48 # get todo list 52 gettodo >> $scriptlog 2>&149 gettodo 53 50 54 51 cd $mars … … 58 55 sequence=${primaries[$s+$s]} 59 56 telnum=${primaries[$s+$s+1]} 60 echo "checking files for sequence $sequence..." >> $scriptlog 2>&161 57 printprocesslog "INFO checking files for sequence $sequence" 62 58 no=`printf %08d $sequence | cut -c 0-4` 63 59 no2=`printf %08d $sequence` 64 60 checkfileavailpath=$logpath/$program/$no 65 makedir $checkfileavailpath >> $scriptlog 2>&161 makedir $checkfileavailpath 66 62 checkfileavaillog=$checkfileavailpath/$program-$no2.log 67 63 68 setstatus "start" >> $scriptlog 2>&164 setstatus "start" 69 65 70 66 check1=`root -q -b $macrospath/checkfileavail.C+\($sequence,$telnum\) | tee $checkfileavaillog | intgrep` 71 67 72 68 case $check1 in 73 1) echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 74 printprocesslog "INFO files available for sequence $sequence" 69 1) printprocesslog "INFO files available for sequence $sequence (check1=$check1)" 75 70 ;; 76 2) echo " check1=$check1 -> files not yet available -> continue..." >> $scriptlog 2>&1 77 printprocesslog "INFO files not yet available for sequence $sequence" 71 2) printprocesslog "INFO files not yet available for sequence $sequence (check1=$check1)" 78 72 check="no" 79 73 ;; 80 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 81 printprocesslog "WARN connection to DB failed" 74 0) printprocesslog "WARN connection to DB failed (check1=$check1)" 82 75 check="no" 83 76 ;; 84 *) echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 85 printprocesslog "ERROR $program.C failed for sequence $sequence" 77 *) printprocesslog "ERROR $program.C failed for sequence $sequence (check1=$check1)" 86 78 com=$Ffilesavail 87 79 check=$check1 … … 89 81 esac 90 82 91 setstatus "stop" >> $scriptlog 2>&183 setstatus "stop" 92 84 done 93 85 94 finish >> $scriptlog 2>&186 finish 95 87
Note:
See TracChangeset
for help on using the changeset viewer.