Hello.
This is a script that we have as a root cron on most of our
servers to run on the hour every hour. It's set up to only check
local file systems (not automounted file systems nor cdroms).
Therefore on the vob servers it checks the file systems the
vobs are stored on as well as root and /var (which we've had
fill up on occasion on our AIX servers). It sends email when
any file system is 98% or more full. We used to have it set
up to check for 95%full or more, but we got tired of the
multiple emails that we got during the night.
Obviously the perl cron suggestion by Alun is slick (perl
always is), but (a) I don't know perl [yet] and (b) our
script checks more than just vob storage file systems (but
I'm sure Alun could alter his suggestion to fit the bill, too).
Hope you find this interesting and helpful.
-Michelle
Michelle MacBean :-)
Sr. Unix System Administrator
Fidelity Investments, Inc.
-----Original Message-----
From: Davies, Alun (London) [mailto:daviealu@MLE.CO.UK
Sent: Tuesday, February 29, 2000 10:03 AM
To: 'Juergen Amthauer'; cciug@Rational.Com
Subject: RE: [cciug] ALERT script if HD is full on Solaris ?
If you want something simple, try a variation of this
In the clearcase administrators crontab:
echo `df -k|grep vobstorage$ |perl -ane '$F[4]=~/(.*)%/; if($1<80){print
"GREEN"}else{print $1<90?"AMBER":"RED"}; '`|mail user@location
<mailto:user@location>
where vobstorage is the path to the vob storage area
Alun
-----Original Message-----
From: Juergen Amthauer [SMTP:juergen.amthauer@nbg6.siemens.de
Sent: Tuesday, February 29, 2000 12:49 PM
To: cciug@Rational.Com
Subject: [cciug] ALERT script if HD is full on Solaris ?
Hi all
Has anyone of you a script which signals via mail or so ... if the
vobstorage area
is near to 100 %
... or even better ... like in startrek
green alert - all is good
yellow alert - over 80 % disk filled
red alert - over 90 %
if one has a good idea how to check this automatically please reply,
it's boring to do
a df -k from time to time ...
--
best regards
+------------------------------------------------------------------+
Juergen Amthauer | mailto:Juergen.Amthauer@nbg6.siemens.de
<mailto:Juergen.Amthauer@nbg6.siemens.de>
Product Integration | mailto:juergen.pat@t-online.de
<mailto:juergen.pat@t-online.de> (private)
Siemens AG, EV NL D3 | WWW : http://www.nbg6.siemens.de/~amthauer
<http://www.nbg6.siemens.de/~amthauer>
Humboldtstrasse 59 | Voice :+49-911-433-8351
D-90459 Nuremberg | Fax :+49-911-433-5494
Germany |
+------------------------------------------------------------------+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:31 EDT