Changeset 12576 for trunk/DataCheck/RsyncAux.sh
- Timestamp:
- 11/20/11 07:13:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/RsyncAux.sh
r12561 r12576 6 6 logfile=/home/`whoami`/DataCheck/log/RsyncAux$today.log 7 7 8 auxdir=loc_data/aux/$date9 8 echo "" >> $logfile 2>&1 10 9 echo "" >> $logfile 2>&1 11 10 echo "" >> $logfile 2>&1 11 # auxiliary data directories on data 12 auxdirdaq=/daq/aux/$date/ # /loc_data from daq via nfs on data 13 auxdirdata=/loc_data/aux/$date 12 14 echo `date`": processing files in "$auxdir >> $logfile 2>&1 13 15 16 # get current hour 14 17 hour=`date +%k` 18 # define bwlimit for rsync depending on the time 15 19 if [ $hour -lt 8 ] || [ $hour -gt 18 ] 16 20 then 17 bwlimit="--bwlimit=2000" 21 # limit bw for rsync to 20 MB/s during night 22 bwlimit="--bwlimit=20000" 18 23 echo "rsync data with "$bwlimit >> $logfile 2>&1 19 24 else 25 # no bw limit during day 20 26 echo "rsync data without bwlimit" >> $logfile 2>&1 21 27 fi 22 28 23 29 #rsync from daq to data 24 if ! /usr/bin/rsync -avxHP $bwlimit 10.0.100.12::$auxdir /$auxdir>> $logfile 2>&130 if ! /usr/bin/rsync -avxHP $bwlimit $auxdirdaq $auxdirdata >> $logfile 2>&1 25 31 then 26 32 echo `date`": problem rsyncing auxiliary data from daq to data"
Note:
See TracChangeset
for help on using the changeset viewer.