Changeset 13578 for trunk/DataCheck/Monitoring/CheckDU.sh
- Timestamp:
- 05/07/12 10:39:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Monitoring/CheckDU.sh
r13301 r13578 43 43 for dir in ${dirs[@]} 44 44 do 45 # get available disk space 46 diskusage=( `df -P $dir | grep $dir ` ) 47 # check if more than X GB are left on /loc_data 48 if [ ${diskusage[3]} -lt $dulimit ] 49 then 50 echo "WARN less than "$dutext" left on "$dir" on node "$HOSTNAME 51 df -h $dir 52 echo "" 45 # check if directory is mounted (check if empty) 46 if [ "$(ls -A $dir)" ] 47 then 48 # get available disk space 49 diskusage=( `df -P $dir | grep $dir ` ) 50 # check if more than X GB are left on /loc_data 51 if [ ${diskusage[3]} -lt $dulimit ] 52 then 53 echo "WARN less than "$dutext" left on "$dir" on node "$HOSTNAME 54 df -h $dir 55 echo "" 56 fi 57 else 58 echo "ERROR "$dir" seems to be not mounted." 53 59 fi 54 60 done
Note:
See TracChangeset
for help on using the changeset viewer.