Changeset 7944 for trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
- Timestamp:
- 08/25/06 22:09:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r7938 r7944 36 36 # 37 37 38 source `dirname $0`/sourcefile 39 printprocesslog "INFO starting $0" 38 40 program=checkstardone 39 source `dirname $0`/sourcefile40 41 41 column=fStarFilesAvail 42 42 43 lockfile=$lockpath/lock-$program.txt 44 45 scriptlogpath=$runlogpath/$program 46 makedir $scriptlogpath 47 scriptlog=$scriptlogpath/$program-$datetime.log 48 43 scriptlog=$runlogpath/$program-$datetime.log 49 44 date >> $scriptlog 2>&1 50 45 51 46 # check if script is already running 47 lockfile=$lockpath/lock-$program.txt 52 48 checklock >> $scriptlog 2>&1 53 49 … … 61 57 finish >> $scriptlog 2>&1 62 58 fi 63 echo "datasets: "${datasets[@]} #>> $scriptlog 2>&159 echo "datasets: "${datasets[@]} >> $scriptlog 2>&1 64 60 rm -v $todofile >> $scriptlog 2>&1 65 61 … … 68 64 for dataset in ${datasets[@]} 69 65 do 66 echo "checking files for dataset $dataset..." >> $scriptlog 2>&1 67 printprocesslog "INFO checking files for dataset $dataset" 70 68 no=`printf %08d $dataset | cut -c 0-5` 71 69 no2=`printf %08d $dataset` 72 70 var1=$no 73 71 var2=$dataset 74 echo "checking files for dataset $dataset..." >> $scriptlog 2>&175 72 datasetfile=$datasetpath/$no/dataset`printf %08d $dataset`.txt 73 76 74 sequences=(`cat $datasetfile | grep Sequences | sed -e 's/SequencesOn://g' | sed -e 's/SequencesOff://g'`) 77 78 75 if [ "$sequences" = "" ] 79 76 then … … 82 79 continue 83 80 fi 81 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 84 82 85 echo "sequences: "${sequences[@]} >> $scriptlog 2>&186 87 83 outpath=$logpath/$program/$no/$no2 88 84 makedir $outpath >> $scriptlog 2>&1 … … 93 89 do 94 90 echo "run $program for sequence $sequence..." >> $scriptlog 2>&1 91 printprocesslog "INFO check availability for sequence $sequence" 95 92 96 93 check1=`root -q -b $macrospath/checkstardone.C+\(\""$sequence\""\) | tee $outpath/checkstardone-$sequence.log | grep int | sed -e 's/(int)//'` … … 99 96 1) echo " check1=$check1 -> everything ok -> continue with next sequence..." >> $scriptlog 2>&1 ;; 100 97 2) echo " check1=$check1 -> files for sequence $sequence not yet available -> continue..." >> $scriptlog 2>&1 98 printprocesslog "INFO files not yet available for sequence $sequence" 101 99 check="no" 102 100 break 103 101 ;; 104 102 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 103 printprocesslog "WARN connection to DB failed" 105 104 check="no" 106 105 break 107 106 ;; 108 107 *) echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1 108 printprocesslog "ERROR $program.C failed" 109 109 com=$Fstardone 110 110 comadd=$sequence
Note:
See TracChangeset
for help on using the changeset viewer.