Ignore:
Timestamp:
07/17/08 16:12:20 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/filesondisk

    r8901 r9008  
    4949program=filesondisk
    5050
     51
    5152set -C
     53
    5254
    5355scriptlog=$runlogpath/$program-$datetime.log
     
    6365cd $mars
    6466
     67
     68# ---------------- check disk for cc-files --------------------
     69
    6570echo "checking disk for ccfiles..."  >> $scriptlog 2>&1
    6671printprocesslog "INFO checking ccfiles"
    6772filename=$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
     73find $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
    7474
    7575echo "resetting runs..." >> $scriptlog 2>&1
    76 check3=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"$column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`
     76check3=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fCCFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep`
    7777
    7878case $check3 in
     
    8989
    9090
     91# ---------------- check disk for caco-files --------------------
    9192
    9293echo "checking disk for cacofiles..."  >> $scriptlog 2>&1
    9394printprocesslog "INFO checking cacofiles"
    9495filename=$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
     97find $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
    10198
    10299echo "resetting runs..." >> $scriptlog 2>&1
    103 check0=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"$column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`
     100check0=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fCaCoFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep`
    104101
    105102case $check0 in
     
    115112esac
    116113
    117 date=`date +%F`
    118 echo "finding missing cacofiles..." >> $scriptlog 2>&1
    119 printprocesslog "INFO checking missing cacofiles"
    120 check1=`root -q -b $macrospath/findcacofiles.C+ | tee $filesondisklogpath/findcacofiles-$datetime.log | intgrep`
    121114
    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
    133132
    134133
     134# ---------------- check disk for rawfiles --------------------
    135135
    136136echo "checking disk for rawfiles..."  >> $scriptlog 2>&1
    137137printprocesslog "INFO checking rawfiles"
    138138filename=$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
     140find $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
    145141
    146142echo "resetting runs..." >> $scriptlog 2>&1
    147 check4=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"$column\""\) | tee $filesondisklogpath/resetall-$column-$datetime.log | intgrep`
     143check4=`root -q -b $macrospath/resetallruns.C+\("\"$filename\""\,"\"fRawFileAvail\"",kFALSE\) | tee -a $scriptlog | intgrep`
    148144
    149145case $check4 in
     
    159155esac
    160156
     157
     158
    161159finish >> $scriptlog 2>&1
    162 
Note: See TracChangeset for help on using the changeset viewer.