Space monitoring (75 Views)
Reply
Contributor
johnreid
Posts: 18
Registered: ‎09-19-2006
Message 1 of 3 (75 Views)

Space monitoring


Hi gurus

can you help me on a shell script which is used to monitor the file system space
example /opt/oracle if it reaches 80% it has to intimate , same script has to monitor /opt/java if it reaches 85% it has to intimate.

Thanks in Advance
Honored Contributor
Denver Osborn
Posts: 1,749
Registered: ‎06-23-2000
Message 2 of 3 (75 Views)

Re: Space monitoring

how about something like to get you started...

until [ `bdf /opt/oracle |awk '/oracle/{print 0+$(NF-1)}'` -ge 80 ]
do
sleep 600
done
take some action here when /opt/oracle is 80%


Don't forget to have a look at this too.
http://forums1.itrc.hp.com/service/forums/helptips.do?#33


-denver
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 3 of 3 (75 Views)

Re: Space monitoring

Shalom,

There are several good examples in this thread and the two that preceeded it.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050

I believe I've got production code in there.

Lots of other goodies too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.