source: trunk/DataCheck/CheckDU.sh@ 12919

Last change on this file since 12919 was 12642, checked in by Daniela Dorner, 13 years ago
during day check for 500 GB, during night during 200 GB
  • Property svn:executable set to *
File size: 579 bytes
Line 
1#!/bin/bash
2
3dir=/loc_data
4if [ "$HOSTNAME" == "daq" ]
5then
6 dir=/raid10
7fi
8
9# get current hour
10hour=`date +%k`
11# define bwlimit for rsync depending on the time
12if [ $hour -lt 10 ] || [ $hour -gt 18 ]
13then
14 # check 200 GB
15 dulimit=209715200
16 dutext="200 GB"
17else
18 # check 500 GB
19 dulimit=524288000
20 dutext="500 GB"
21fi
22
23# get available disk space
24diskusage=( `df -P $dir | grep $dir ` )
25# check if more than X GB are left on /loc_data
26if [ ${diskusage[3]} -lt $dulimit ]
27then
28 echo "WARN less than "$dutext" left on /loc_data on node "$HOSTNAME
29 df -h $dir
30fi
31
Note: See TracBrowser for help on using the repository browser.