- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script to monitor the systems.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 02:24 AM
тАО12-07-2004 02:24 AM
Script to monitor the systems.
I am again in a need of help to develop a script which shall monitor for CPU and Memory for average usage. And if the usage is consistently high for 5-10 Minutes, it should mail to particular mail alias. Does some one have anything on their systems already. I could do this, but I am not a expert, please send help, every help is appreciated.
Thanks and regards
Prashant
- Tags:
- Monitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 02:31 AM
тАО12-07-2004 02:31 AM
Re: Script to monitor the systems.
# cat uptime.mon
#!/bin/sh
#
# Name: /scripts/uptime.mon
# Files Used: /scripts/uptime.mon.mesg
#
# Description: This is a script to run "uptime" and send e-mail if the
# system is busy. This is a pro-active script that
# will notify the users emails in the variable MAILADMIN
# And busy variable is the CPU threshold before
# mailing the message to MAILAMIN.
#
# log file: /tmp/uptime.mon.log
logfile=/tmp/uptime.mon.log
if [ -f $logfile ];
then
touch $logfile
else
touch $logfile
fi
busy=170
#
# GUTS of the script
#
#
uptime| cut -d"load average: " -f2 |cut -c14,16-17 |
read sizz;
echo `date``uptime|cut -c28-71` >>$logfile 2>&1
if [ $busy -le $sizz ];
then
/usr/bin/mailx -s "WARN: Sysload HIGH: `uptime|awk '{print $10}'`" `cat /scripts/mailadmin.list` < /scripts/uptime.mon.mesg
fi
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 04:55 AM
тАО12-07-2004 04:55 AM
Re: Script to monitor the systems.
Doesnt someone have any other suggestions on this? Please reply..
Thanks and regards
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 05:14 AM
тАО12-07-2004 05:14 AM
Re: Script to monitor the systems.
Output looks like:
# memdetail
Memory Stat total used avail %used
physical 10080.0 9375.4 704.6 93%
active virtual 10367.6 4340.3 6027.3 42%
active real 7244.3 2914.4 4329.9 40%
memory swap 7692.9 1310.7 6382.3 17%
device swap 26528.0 9963.6 16564.4 38%
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 05:19 AM
тАО12-07-2004 05:19 AM
Re: Script to monitor the systems.
If you don't want to use it, you might want to look at some of the scripts...
For example, link to bb-memory.sh
http://www.deadcat.net/download.php?fileid=750&filename=bb-memory.sh&location=1
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 05:44 AM
тАО12-07-2004 05:44 AM
Re: Script to monitor the systems.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 07:06 AM
тАО12-07-2004 07:06 AM
Re: Script to monitor the systems.
How can I work out to just enable the mwa agent and alert only on memory and cpu. Are there other things also which will come on in picture when I start mwa.
Or enable mwa and run script through crontab-- is that possible.
Thanks a lot for responses..I dont know how mwa works--
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 07:19 AM
тАО12-07-2004 07:19 AM
Re: Script to monitor the systems.
alarm Memory_Bottleneck > 50 for 5 minutes
type = "Memory"
start
if Memory_Bottleneck > 90 then
red alert "Memory Bottleneck probability= ", Memory_Bottleneck, "%"
##exec "echo "Memory_Bottleneck"|mailx xyz@abc.com -s "Memory Alarm""
else
yellow alert "Memory Bottleneck probability= ", Memory_Bottleneck, "%"
repeat every 10 minutes
if Memory_Bottleneck > 90 then
red alert "Memory Bottleneck probability= ", Memory_Bottleneck, "%"
##exec "echo "Memory_Bottleneck"|mailx xyz@abc.com -s "Memory Alarm""
else
yellow alert "Memory Bottleneck probability= ", Memory_Bottleneck, "%"
end
reset alert "End of Memory Bottleneck Alert"
Modify the cput section in same way. then run a command utility. On utility prompt do alamdef. Ths check the syntax os the alarmdef file. Once successful, do mwa restart scopeux
Read man page of utility for details.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 07:38 AM
тАО12-07-2004 07:38 AM
Re: Script to monitor the systems.
Got thru working with Utility program. Now I am just curious, once I start the mwa agent, will it inform concerned team automatically, according to me it will..
And also is there something available which can give me the details of syntaxes/commands which can be used under this file.
Thanks a lot, I appreciate a lot.
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-07-2004 07:44 AM
тАО12-07-2004 07:44 AM
Re: Script to monitor the systems.
Anil