System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

File systems notification on HP-UX

SOLVED
Go to solution
gab_in
Regular Advisor

File systems notification on HP-UX

Hi,

I would like to implement automatic e-mail notification on HP-UX Servers when any file system in the HP-UX Servers reach 97 %. Please let me know how can I do that and send me if you have any script for the same and the procedure.

Thanks in advance
Gab
15 REPLIES
Avinash20
Honored Contributor

Re: File systems notification on HP-UX

Refer to

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1234770374985+28353475&threadId=5827
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Jose luis Martinez Esca
Occasional Advisor

Re: File systems notification on HP-UX

hi gab_in

If you have installed openview in your box you should configure MWA because you can monitoring a lot of items in your system and it has an historical DB from you could get information to make performance reports and it sends emails too.

CH2
OldSchool
Honored Contributor

Re: File systems notification on HP-UX

get a copy of bdfmegs script by Bill H. It attached to a post here:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262&admit=109447626+1235063735077+28353475

In your script run that w/ -P 97 (I believe) and parse out the filesystem names using whatever tool you like ("cut" and "awk" come to mind) dumping that to a file. you can then do something like:

cat Your_File | mailx -s "Disk Use" -r des@some.domain

to send it.
Patrick Wallek
Honored Contributor

Re: File systems notification on HP-UX

Oldschool is correct.

# bdfmegs -P 97

will give you all filesystems that are 97% capacity or greater.

No need to do it in 2 steps though.

# bdfmegs -P 97 | mailx -s "Filesystems greater than 97%" you@somedomain.com

will work just fine.

You can schedule that to run from cron every few minutes.
OldSchool
Honored Contributor

Re: File systems notification on HP-UX

Patrick noted that it can be done as a "one-liner". One potential advantage of multiple steps would be that you can test to see if there *aren't* any and skip the email step.
Patrick Wallek
Honored Contributor
Solution

Re: File systems notification on HP-UX

>>would be that you can test to see if there
>>*aren't* any and skip the email step.

Good point.

I might do something like this:

# cat bdfg-monitor.sh

#!/usr/bin/sh
bdfg -P 97 -q > /var/tmp/bdfg-monitor

if [[ -s /var/tmp/bdfg-monitor ]] ; then
mailx -s "Files systems over 97%" you@yourdomain.com < /var/tmp/bdfg-monitor
fi

gab_in
Regular Advisor

Re: File systems notification on HP-UX

Hi,

From where I can get the 'bdfmegs' utlity ?

Thanks
Gab
Ganesan R
Honored Contributor

Re: File systems notification on HP-UX

gab_in
Regular Advisor

Re: File systems notification on HP-UX

Hi Ganesan,

Thanks for the reply.

I checked the link which u sent but didn't get any script there to download.

Pls tell me.. from where and how to download the script.

Thanks in advance
Gab
Ganesan R
Honored Contributor

Re: File systems notification on HP-UX

Hi,

It is not a utility. It is a script written by Bill Hassel. You need to copy the script to your server and run it.

Just open the attachment which Bill attached and copy it your server from that link.
Best wishes,

Ganesh.
gab_in
Regular Advisor

Re: File systems notification on HP-UX

Hi Ganesan,

I have tried to download the attachement , but when I click on the attachedment , it is downloading a HTML file (getattachment.do). Please suggest how to download it.

Thanks
Gab
Dennis Handly
Acclaimed Contributor

Re: File systems notification on HP-UX

>it is downloading a HTML file (getattachment.do).

Have you used left click on it?
You can also use:
http://forums.itrc.hp.com/service/forums/getattachment.do?attachmentId=279202&ext=.sh
Suraj K Sankari
Honored Contributor

Re: File systems notification on HP-UX

Hi,

Please assign some points who give there valuable time for your question.

Suraj

Re: File systems notification on HP-UX

gab_in
Regular Advisor

Re: File systems notification on HP-UX

thanks