1834230 Members
2607 Online
110066 Solutions
New Discussion

SCRIPT

 
SOLVED
Go to solution
prash_1
Frequent Advisor

SCRIPT


Dear Gurus,
I am using HP-UX 11i

in my system DATA-BASE is creating archives in one LV.
I want on script when that LV goes upto 90%
one mail will generate and that mail will forward to my mail address.



Thanks in adv.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: SCRIPT

Hi:

Here's a simple script.

# bdf /mydatabase|awk 'NR==2 {split($5,a,"%");if (a[1]>=90) {exit 0};exit 1}' && mailx -s "Filesystem >= 90% full" prash < /dev/null

This assumes that the name of the monitored filesystem is "/mydatabase" and that when your filesystem utilization is greater than or equal to 90%, an email alert to you is generated.

The idea is that you would 'cron' this to run periodically.

Regards!

...JRF...
Florian Heigl (new acc)
Honored Contributor

Re: SCRIPT

You don't neeed a script for that - SAM has an interface to the Event Monitoring System (EMS) which can do just what You want.


Fire up graphical SAM (text mode had issues with EMS for me) and roughly follow this tree:
SAM ->
Resource Management ->
Event Monitoring Service ->
Add ->
Monitoring Request ->
system ->
filesystem ->
availMb


set the database archive log filesystem to email at condition availMb < FS_Size/10

Set Email on 'initial'
Enter Email address


I suggest You use this over a script, it's reasonably flexible and OS internal, thus more reliable.
yesterday I stood at the edge. Today I'm one step ahead.
prash_1
Frequent Advisor

Re: SCRIPT

thanks for your Valuable information I done it through SAM