Changeset 13580 for trunk


Ignore:
Timestamp:
05/07/12 10:42:36 (13 years ago)
Author:
Daniela Dorner
Message:
run skript only for last three days or last X GB of data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Transfer/CheckTransfer.sh

    r13312 r13580  
    66source `dirname $0`/../Sourcefile.sh
    77printprocesslog "INFO starting $0"
     8
     9ssh fact@161.72.93.131 "df -h /*da*"
     10
     11df -h /scratch
    812
    913# get last 10 nights (skip current night)
     
    1519        )
    1620
     21dates=( `ssh fact@161.72.93.131 "find /loc_data/zipraw -mindepth 3 -type d | sort | sed -e 's/\/loc_data\/zipraw\///g' "` )
     22
    1723numdaysok=0
    18 numdaysoklimit=1
     24numdaysoklimit=3
     25sumdata=0
     26checklimit=2000
    1927for date in ${dates[@]}
    2028do
     
    3038   
    3139   # check always only $numdaysoklimit days
    32    if [ $numdaysok -ge $numdaysoklimit ]
    33    then
    34       echo "INFO more than "$numdaysoklimit" ok -> stop. "
     40   # and require at least $checklimit GB that have been checked
     41   #  remark: bc: expr1 < expr2: the result is 1 if expr1 is strictly less than expr2
     42   if [ $numdaysok -ge $numdaysoklimit ] && [ $(echo " $sumdata > $checklimit " | bc -l) -eq 1 ]
     43   then
     44      echo "INFO more than "$numdaysoklimit" ok and more than "$checklimit" GB checked. "
    3545      continue
    3646   fi
     
    301311   fi
    302312   
     313   #numdiff=0 # add for debugging so that single file sizes are not checked
    303314   echo "numdiff: "$numdiff
    304315   echo "INFO numok: "$numok
     
    539550   echo " ldaw-ldaw-ldaw-ldaw"
    540551   echo " "$result
     552   sumdatanew=`echo " ( ${data[1]} + ${zip[1]} ) / 1024 / 1024 / 1024 " | bc -l `
     553   sumdata=`echo " $sumdata + $sumdatanew " | bc -l `
     554   echo "checked alread "$sumdata" GB."$sumdatanew" "${data[1]}" "${zip[1]}
    541555   #if [ $numpb -eq 0 ]
    542556   if [ $numpb -lt 4 ]
Note: See TracChangeset for help on using the changeset viewer.