Monitoring disk space usage (419 Views)
Reply
Contributor
B. Jen
Posts: 23
Registered: ‎12-14-2004
Message 1 of 12 (419 Views)
Accepted Solution

Monitoring disk space usage

Hi, I am new to HP-UX. Is there a way to monitor the disk usage. When the free disk space is below certain level, send us an email alert. Thank you for answers.

Please use plain text.
Valued Contributor
paolo barila
Posts: 193
Registered: ‎03-31-2003
Message 2 of 12 (419 Views)

Re: Monitoring disk space usage

Hi,

start with

# bdf

# du -akx | sort -n
share share share
Please use plain text.
Honored Contributor
Ivan Ferreira
Posts: 6,957
Registered: ‎05-07-2004
Message 3 of 12 (419 Views)

Re: Monitoring disk space usage

You can try this:

http://directory.fsf.org/diskfree.html

Or create a shell script based on bdf.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Please use plain text.
Honored Contributor
Kent Ostby
Posts: 1,836
Registered: ‎09-26-2000
Message 4 of 12 (419 Views)

Re: Monitoring disk space usage

Bernard --

There are several HP products that will do monitoring and send you email.

EMS is one.

You can find out more information about it here:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8678BA:B7612-90009
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Please use plain text.
Honored Contributor
Mark Greene_1
Posts: 1,422
Registered: ‎06-26-2001
Message 5 of 12 (419 Views)

Re: Monitoring disk space usage

Run this:

/etc/opt/resmon/lbin/monconfig

and you can setup monitoring that will e-mail the results. You can setup a mail alias in /etc/mail/aliases to point to an external mail address, provided you have sendmail or something similar running point to a pop3 mail server.

mark
the future will be a lot like now, only later
Please use plain text.
Respected Contributor
Sยภเl Kย๓คг
Posts: 526
Registered: ‎08-19-2004
Message 6 of 12 (419 Views)

Re: Monitoring disk space usage

Hi,

bdf, df, du are most of the commands which can help you to monitor the file stems manually. How ever you can make use of EMS to report the statistics.

And also there are many freewares available in net like "Big Brother" which helps you to give graphical display alerts. Better try it, it's good tool

Regards,
Sunil
Your imagination is the preview of your life's coming attractions
Please use plain text.
Honored Contributor
Geoff Wild
Posts: 7,168
Registered: ‎06-04-2001
Message 7 of 12 (419 Views)

Re: Monitoring disk space usage

If you can't afford OVO - then Big Brother may be for you (we use as a backup to OVO):

http://www.bb4.org/

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Please use plain text.
Honored Contributor
Paul Sperry
Posts: 1,442
Registered: ‎10-07-2002
Message 8 of 12 (419 Views)

Re: Monitoring disk space usage

I use the free version of bigbrother to monitor all of my servers disk usage (unix and windows). It also monitors my oracle and sql servers and many other services.
you cand download it and check it out more here:

http://bb4.org
Please use plain text.
Honored Contributor
Paul Sperry
Posts: 1,442
Registered: ‎10-07-2002
Message 9 of 12 (419 Views)

Re: Monitoring disk space usage

I use the free version of bigbrother to monitor all of my servers disk usage (unix and windows). It also monitors my oracle and sql servers and many other services.
you can download it and check it out more here:

http://bb4.org
Please use plain text.
Honored Contributor
Paul Sperry
Posts: 1,442
Registered: ‎10-07-2002
Message 10 of 12 (419 Views)

Re: Monitoring disk space usage

here is a script we run via cron.
If the disk usage is above 89% I get paged.
Could easily be change to send email to me
just change techpgr@domain.com to mylogin@domain.com


#!/usr/bin/ksh
/usr/bin/bdf -l | grep -iv filesystem |
awk '{if (NF!=1){if (NF==5){print $4"\t" $5"\t"}
else{print $5"\t\t" $6"\t"}}}' |
sed 's/'%'/''/' > /tmp/bdf_info
#
function check {
while read percent dir
do
if [[ $percent -ge 89 ]] ; then
echo "File system full-`hostname`:$dir is at $percent%" | /usr/bin/mailx -s "Server disks" t
echpgr@domain.com
fi
done
} < /tmp/bdf_info

check
rm /tmp/bdf_info
Please use plain text.
Esteemed Contributor
Arturo Galbiati
Posts: 830
Registered: ‎02-10-2003
Message 11 of 12 (418 Views)

Re: Monitoring disk space usage

Hi


bdf|awk -v PCT=90 'NR==1||substr($5,1,index($5,"%")-1)+0>=PCT'|mailx -s "Mountpoint over PCT" yourmailaddress

This will sent you by email all mount point over the PCT (in this case 90%).

HTH,
Art
Please use plain text.
Frequent Advisor
Deepak.R
Posts: 44
Registered: ‎01-03-2005
Message 12 of 12 (418 Views)

Re: Monitoring disk space usage

Hi ,

Paul`s suggestion looks good,

make use of bdf output and write a script which will mail you alerts.

also you can monitor inides usage by bdf -i

thanks
deepak
Please use plain text.
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