Last change
on this file since 12923 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 |
|
---|
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 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
|
---|
24 | diskusage=( `df -P $dir | grep $dir ` )
|
---|
25 | # check if more than X GB are left on /loc_data
|
---|
26 | if [ ${diskusage[3]} -lt $dulimit ]
|
---|
27 | then
|
---|
28 | echo "WARN less than "$dutext" left on /loc_data on node "$HOSTNAME
|
---|
29 | df -h $dir
|
---|
30 | fi
|
---|
31 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.