1827693 Members
3140 Online
109967 Solutions
New Discussion

System Monitoring!

 
Mike_21
Frequent Advisor

System Monitoring!

Does anyone have any suggestions on a possible free application that will monitor things like disk space, and maybe check if the system is responding then send a message to an alphanumeric pager?

Thanks
4 REPLIES 4
Rob Smith
Respected Contributor

Re: System Monitoring!

Hi, here is a script that will monitor disk space and alert you when it reaches a certain level.

#!/usr/bin/sh
##

bdf | grep -iv filesystem | awk '{print $6 " "$5}' | while
read LINE; do
PERC=`echo $LINE | cut -d "%" -f1 | awk '{ print $2 }'`
if [[ $PERC -gt 90 ]]; then
echo "${PERC}% ALERT!" | mailx -s "${LINE} on `hostname` is almost full" root
fi
done

exit

To see if a system is up or not you could use something like:

#!/usr/bin/sh
##

HOSTNAME_FILE=/etc/hosts.strip
for host in $(cat $HOSTNAME_FILE)
do
ping $host -n 1 | grep -q '1 packets received'
if [ $? = 0 ]
then
echo "$host: OK"
else
echo "$host: FAIL"
fi
done

You create the hosts file with the machines you want to ping and assign that file to the HOSTNAME_FILE variable. You can then set the script to e-mail you if a system does not respond. Set these up as cron jobs and have them fire off every half hour or so. Hope this helps.

Rob


Learn the rules so you can break them properly.
Brian Taylor
Advisor

Re: System Monitoring!

HPUX boxes are great from sending out SNMP info. There are a ton of apps out there that monitor different SNMP trap info. SNMPView is not a bad freeware one.

This might be a simple solution to your search.
James R. Ferguson
Acclaimed Contributor

Re: System Monitoring!

Hi Mike:

You can leverage the EMS toolset from the SupportPlus cdrom's DIAGNOSTICS suite, too. Take a look at "Using EMS HA Monitors":

http://docs.hp.com/hpux/onlinedocs/B5735-90001/B5735-90001.html

...JRF...
Chris Calabrese
Valued Contributor

Re: System Monitoring!

If you want something a little more comprehensive, but dont' have big bucks, check out Big Brother (http://bb4.com/). It's is very popular at universities.
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader