Operating System - HP-UX
1854677 Members
14524 Online
104102 Solutions
New Discussion

Re: Re : Can Someone advice ??

 
Vincent_5
Super Advisor

Re : Can Someone advice ??

Hi,
Can someone tell me how can I sendup a unix server to do the following :

1. inform administrator that disk space is low
2. inform administrator that power supply is down

basically is what have I to send up on the server so that this function can be perform.


Thanks in advance !!

Vincent
nothing is better than to know more
7 REPLIES 7
David Lodge
Trusted Contributor

Re: Re : Can Someone advice ??

The best way is to get some form of management console, like VantagePoint or Patrol to handle this for you.

1. Can be done by monitoring a volume constantly
2. Can only be done by pinging from a different system - unless your power systems in your comms room are intelligent
T G Manikandan
Honored Contributor

Re: Re : Can Someone advice ??

HP openview
Vantage point operations can do great things more than the things you have mentioned.

The other way is to write scripts and use sendmail to send mails.

check this link.

http://bizforums.itrc.hp.com/cm/QuestionAnswer/1,,0x10294b3ef09fd611abdb0090277a778c,00.html
Yogeeraj_1
Honored Contributor

Re: Re : Can Someone advice ??

hi,

One simple way, will be to setup cron jobs to execute the monitoring scripts.
E.g.
crontab -l
#*******************************************************************************
# min|hour |day |month|day |script
# | |of mo| |of wk|
#----|-----|-----|-----|-----|--------------------------------------------------
#*******************************************************************************
5 * * * * /scripts/check.sh 1>/tmp/output.log 2>error.log

The check script should contain all the desired commands.

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Elif Gius
Valued Contributor

Re: Re : Can Someone advice ??

Hi,

you can use EMS (Event Monitoring System) to handle some triggy situation. With EMS there are several pre-configured monitors for your HW Subsystem...

for monitoring disk space : use HP OpenView if you have or write a shell script...

there are many threads in the forum..just search for "monitoring disk space" or something similar.

David Lodge
Trusted Contributor

Re: Re : Can Someone advice ??

*don't* use the above cron line.

A basic principle of security. *never* put privileged user owned files in shared writable areas. This is a way to have any file trashed on you system by malicious users.

A better suggestions would be to have a private log area; eg:

mkdir -p /var/opt/admin/logs
chown -R root:admins /var/opt/admin
chmod -R 755 /var/opt/admin

Then have a cron like:
5 * * * * /scripts/check.sh 1>/var/opt/admin/logs/check.$(date +%Y%m%d%H%M) 2>error.log
Jon Mattatall
Esteemed Contributor

Re: Re : Can Someone advice ??

We use BigBrother (http://bb4.com, free for non-commercial use) to monitor all manner of server parameters. Some scripts come standard, some were written here, and some from www.deadcat.net.

It's just a lot of shell scripts, but it works for us.

Jon
A little knowledge is dangerous - none is absolutely terrifying!!!
Thomas M. Williams_1
Frequent Advisor

Re: Re : Can Someone advice ??

Here is a shell that I have at the end of my ".profile". In my case I login and out of my systems all day. This script displays the disks over 80% full and highlights the disks over 90%. Hope this helps. You could make some modifications and stick in CRON to keep a running log and/or send an email. Let me know if you can read the attachment, its my first attempt at it.
I Think the Clock is Slow ...