Changeset 12642 for trunk/DataCheck/CheckDU.sh
- Timestamp:
- 11/25/11 06:03:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/CheckDU.sh
r12631 r12642 7 7 fi 8 8 9 # get current hour 10 hour=`date +%k` 11 # define bwlimit for rsync depending on the time 12 if [ $hour -lt 10 ] || [ $hour -gt 18 ] 13 then 14 # check 200 GB 15 dulimit=209715200 16 dutext="200 GB" 17 else 18 # check 500 GB 19 dulimit=524288000 20 dutext="500 GB" 21 fi 22 23 # get available disk space 9 24 diskusage=( `df -P $dir | grep $dir ` ) 10 25 # check if more than X GB are left on /loc_data 11 if [ ${diskusage[3]} -lt 209715200 ] # 200 GB 12 #if [ ${diskusage[3]} -lt 104857600 ] # 100 GB 26 if [ ${diskusage[3]} -lt $dulimit ] 13 27 then 14 echo "WARN less than 200 GBleft on /loc_data on node "$HOSTNAME28 echo "WARN less than "$dutext" left on /loc_data on node "$HOSTNAME 15 29 df -h $dir 16 30 fi
Note:
See TracChangeset
for help on using the changeset viewer.