Operating System - HP-UX
1834803 Members
2801 Online
110070 Solutions
New Discussion

Hello experts, need help urgent......

 
Amitkumar_1
Occasional Advisor

Hello experts, need help urgent......

Guru's will u give me the script ,which will give the alert when file system use will go over certain(80%) limit.
8 REPLIES 8
Muthukumar_5
Honored Contributor

Re: Hello experts, need help urgent......

Simply as,

/usr/bin/bdf | tail -1 | awk '{ if ($5 > 80) { print "file system "$6" is over 80%"; }}' | mailx -s "File system Alert" @domainname.com

Put this in cron tab as,

5 * * * * /usr/bin/bdf | tail -1 | awk '{ if ($5 > 80) { print "file system "$6" is over 80%"; }}' | mailx -s "File system Alert" @domainname.com 1>/dev/null 2>&1

will check every 5 minutes.

--
Muthu
Easy to suggest when don't know about the problem!
Peter Godron
Honored Contributor

Re: Hello experts, need help urgent......

Muthukumar_5
Honored Contributor

Re: Hello experts, need help urgent......

More script(s):

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

change the % according to your requirement.

--
Muthu
Easy to suggest when don't know about the problem!
Amitkumar_1
Occasional Advisor

Re: Hello experts, need help urgent......

Experts, thanks for scripts,

but one ? what is for Remote servers, is it work.
Senthil Kumar .A_1
Honored Contributor

Re: Hello experts, need help urgent......

Hi,

refer to "Robert Hoey's" post for file system check.He has used a threshold of 90%, you could change to 80%

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

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Arunvijai_4
Honored Contributor

Re: Hello experts, need help urgent......

Hi Amit,

Yes, It will work for remote servers as well. make sure mail is configured properly.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Senthil Kumar .A_1
Honored Contributor

Re: Hello experts, need help urgent......

Hi,

If you need remote execution, make sure "remsh" is enabled and u configure ".rhosts" and /etc/hosts.equiv accordingly. But doing so is unsafe.U could use "ssh" instead.

Or else, make sure these scripts run locally on all the machine. but change the "mail address" of these scripts to send the mail alerts to single centralized server.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Amitkumar_1
Occasional Advisor

Re: Hello experts, need help urgent......

I got Full information...thanks guru's.