Changeset 9008 for trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
- Timestamp:
- 07/17/08 16:12:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
r8901 r9008 49 49 program=filesondisk 50 50 51 51 52 set -C 53 52 54 53 55 scriptlog=$runlogpath/$program-$datetime.log … … 63 65 cd $mars 64 66 67 68 # ---------------- check disk for cc-files -------------------- 69 65 70 echo "checking disk for ccfiles..." >> $scriptlog 2>&1 66 71 printprocesslog "INFO checking ccfiles" 67 72 filename=$filesondisklogpath/ccfilesondisk-$datetime.txt 68 if ls $filename >/dev/null 2>&1 69 then 70 rm -v $filename >> $scriptlog 2>&1 71 fi 72 column=fCCFileAvail 73 find $subsystempath/cc/ -name '*_S.rep' | cut -d_ -f2 > $filename 73 find $subsystempath/cc/ -regextype posix-egrep -regex "^$subsystempath/cc/20[01][0-9]/[01][0-9]/[0-3][0-9]/20[01][0-9][01][0-9][0-3][0-9]_(M[0-9]_)?[0-9]{5,8}(\.[0-9]{3,5})?_[PCD]_.*.rep$" | grep -E -o "(_M[0-9])?_[0-9]{5,8}(\.[0-9]{3,5})?_" > $filename 74 74 75 75 echo "resetting runs..." >> $scriptlog 2>&1 76 check3=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\" $column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`76 check3=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fCCFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep` 77 77 78 78 case $check3 in … … 89 89 90 90 91 # ---------------- check disk for caco-files -------------------- 91 92 92 93 echo "checking disk for cacofiles..." >> $scriptlog 2>&1 93 94 printprocesslog "INFO checking cacofiles" 94 95 filename=$filesondisklogpath/cacofilesondisk-$datetime.txt 95 if ls $filename >/dev/null 2>&1 96 then 97 rm -v $filename >> $scriptlog 2>&1 98 fi 99 column=fCaCoFileAvail 100 find $subsystempath/caco/ -name '*.txt' | cut -d_ -f8 | grep [0-9] > $filename 96 97 find $subsystempath/caco/ -regextype posix-egrep -regex "^$subsystempath/caco/20[01][0-9]/[01][0-9]/[0-3][0-9]/dc_20[01][0-9]_[01][0-9]_[0-3][0-9]_[012][0-9]_[0-5][0-9]_[0-5][0-9]_[0-9]{5,8}_.*\.txt$" | grep -E -o "(_M[0-9])?_[0-9]{5,8}(\.[0-9]{3,5})?_" > $filename 101 98 102 99 echo "resetting runs..." >> $scriptlog 2>&1 103 check0=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\" $column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`100 check0=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fCaCoFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep` 104 101 105 102 case $check0 in … … 115 112 esac 116 113 117 date=`date +%F`118 echo "finding missing cacofiles..." >> $scriptlog 2>&1119 printprocesslog "INFO checking missing cacofiles"120 check1=`root -q -b $macrospath/findcacofiles.C+ | tee $filesondisklogpath/findcacofiles-$datetime.log | intgrep`121 114 122 case $check1 in 123 1) echo " check1=$check1 -> everything ok -> missing cacofiles are found" >> $scriptlog 2>&1 124 printprocesslog "INFO missing cacofiles found" 125 ;; 126 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 127 printprocesslog "WARN connection to DB failed" 128 ;; 129 *) echo " check1=$check1 -> ERROR -> something went wrong while resetting" >> $scriptlog 2>&1 130 printprocesslog "ERROR findcacofiles.C failed" 131 ;; 132 esac 115 # ---------------- find missing caco-files -------------------- 116 117 #echo "finding missing cacofiles..." >> $scriptlog 2>&1 118 #printprocesslog "INFO checking missing cacofiles" 119 #check1=`root -q -b $macrospath/findcacofiles.C+ | tee -a $scriptlog | intgrep` 120 # 121 #case $check1 in 122 # 1) echo " check1=$check1 -> everything ok -> missing cacofiles are found" >> $scriptlog 2>&1 123 # printprocesslog "INFO missing cacofiles found" 124 # ;; 125 # 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 126 # printprocesslog "WARN connection to DB failed" 127 # ;; 128 # *) echo " check1=$check1 -> ERROR -> something went wrong while resetting" >> $scriptlog 2>&1 129 # printprocesslog "ERROR findcacofiles.C failed" 130 # ;; 131 #esac 133 132 134 133 134 # ---------------- check disk for rawfiles -------------------- 135 135 136 136 echo "checking disk for rawfiles..." >> $scriptlog 2>&1 137 137 printprocesslog "INFO checking rawfiles" 138 138 filename=$filesondisklogpath/rawfilesondisk-$datetime.txt 139 if ls $filename >/dev/null 2>&1 140 then 141 rm -v $filename >> $scriptlog 2>&1 142 fi 143 column=fRawFileAvail 144 find $datapath/rawfiles/20[0-1][0-9]/ -name '*.raw' -o -name '*.gz' | cut -d_ -f2 > $filename 139 140 find $datapath/rawfiles/20[01][0-9] -regextype posix-egrep -regex "^$datapath/rawfiles/20[01][0-9]/[01][0-9]/[0-3][0-9]/20[01][0-9][01][0-9][0-3][0-9]_(M[0-9]_)?[0-9]{5,8}(\.[0-9]{3,5})?_[PCD]_.*\.raw(\.gz)?$" | grep -E -o "(_M[0-9])?_[0-9]{5,8}(\.[0-9]{3,5})?_" > $filename 145 141 146 142 echo "resetting runs..." >> $scriptlog 2>&1 147 check4=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\" $column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`143 check4=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fRawFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep` 148 144 149 145 case $check4 in … … 159 155 esac 160 156 157 158 161 159 finish >> $scriptlog 2>&1 162
Note:
See TracChangeset
for help on using the changeset viewer.