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