- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- monitoring system performance
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
тАО08-17-2005 01:10 AM
тАО08-17-2005 01:10 AM
I want to design a system monitor solution. No biz management tools will be used. Just use UNIX command ps,sar,iostat,top,vmstat,uptime and shell script to archive the goal. But I am not familiar with the shell script. I wonder whether I can get the followed function through shell script,
1) monitor system performance.Like CPU usage, disk I/O usage, Swap usage, Memory usage and so on.
2) Ability to set and monitor predefined threshold.
3) Auto send notification after perdefined threshold are exceeded.
4) Ability check system log and auto send notification when error detected.
Any advice and reference are welcome.
Yongye
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 01:14 AM
тАО08-17-2005 01:14 AM
Re: monitoring system performance
Check man of the "sar" command. It's standard on all hp-ux servers and is able to collect and store all information you want.
Enjoy :)
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 01:29 AM
тАО08-17-2005 01:29 AM
Re: monitoring system performance
Use commands like uptime, top -d 1, sar swapinfo -tam, etc...
Or download Big Brother:
http://www.bb4.org/
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 01:32 AM
тАО08-17-2005 01:32 AM
Solution#!/bin/sh
THRESHHOLD="7[0-9]%"
THRESHHOLD1="8[0-9]%"
THRESHHOLD2="9[0-9]%"
THRESHHOLD3="100%"
# BDF ON SERVER XXXXX#1
echo "#####################" > bdf_on_servers.txt
echo "# BDF ON XXXX#1 #" >> bdf_on_servers.txt
echo "#####################" >> bdf_on_servers.txt
echo "\n" >> bdf_on_servers.txt
echo "Filesystem kbytes used avail %used Mounted on \n" >> bdf_on_servers.txt
bdf -l | grep -e $THRESHHOLD -e $THRESHHOLD1 -e $THRESHHOLD2 -e $THRESHHOLD3 >> bdf_on_servers.txt
# BDF ON SERVER XXXXX#2
echo "#####################" > bdf_on_servers.txt
echo "# BDF ON XXXX#2 #" >> bdf_on_servers.txt
echo "#####################" >> bdf_on_servers.txt
echo "\n" >> bdf_on_servers.txt
echo "Filesystem kbytes used avail %used Mounted on \n" >> bdf_on_servers.txt
remsh XXXXX#2 -n "bdf -l | grep -e $THRESHHOLD -e $THRESHHOLD1 -e $THRESHHOLD2 -e $THRESHHOLD3" >> bdf_on_servers.txt
ux2dos bdf_on_servers.txt | mailx -s "BDF on UNIX SERVERS" yongye@xxx.com
# TOP ON SERVER XXXXX#1
echo "#####################" > top_on_servers.txt
echo "# TOP ON XXXX#1 #" >> top_on_servers.txt
echo "#####################" >> top_on_servers.txt
top >> top_on_servers_tmp.txt
more top_on_servers_tmp.txt | grep Memory >> top_on_servers.txt
ux2dos top_on_servers.txt | mailx -s "TOP on UNIX SERVERS" yongye@xxx.com
Where XXXX#1 are yopur servers.
Regards, Ernesto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 01:33 AM
тАО08-17-2005 01:33 AM
Re: monitoring system performance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 01:57 AM
тАО08-17-2005 01:57 AM
Re: monitoring system performance
Look at the attached script. I hope it can do most of needed things.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 04:31 PM
тАО08-17-2005 04:31 PM
Re: monitoring system performance
Thank you very much for your help. I have already assigned point to you. The sample script really gives me a good start.
But I still wonder whether it is posible to get the function from shell script for auto send notification when threshold or error occured. Would you please give me more informaiton on this? Thanks.
Hi Geoff Wild, For the security and cost reason, either free ware or biz software are not allowed to use on our system.Thanks.
Hi Pedro Cirne and Marvin Strong, also thanks for your help.
Regards,
Yonyge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 08:48 PM
тАО08-17-2005 08:48 PM
Re: monitoring system performance
You could solve your problem by adding monitors request in SAM like for filesystems' usage.
Resource Management>Event Monitoring Service
Actions>Add Monitoring Request...
choose in Resource Class system than filesystem, availMB. Than choose Resorce Instance like root, press OK. After you can set the monitorig parameters and the way how the notification would be sent.
Best Regards,
Borislav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2005 09:10 PM
тАО08-17-2005 09:10 PM
Re: monitoring system performance
Thanks for your reply. I think you are right. EMS is a good tools to monitor the system status. But many of its function is to monitor the target for up and down status. For performance monitoring it does little. I will consider it as the tools used in the event management.
Thanks again.
Yongye
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2005 02:11 AM
тАО08-18-2005 02:11 AM
Re: monitoring system performance
AFAIK, the best and the simplest way to receive messages in case of some overloading is using of standard SNMP monitors (OV, CA, BigBrother, BigSister etc). Some of the are free e.g. Big Brother. But if you want to do this by yourself, you can analyze output of commands like sar or swapinfo.
You can see a part of such a script below.
/usr/sbin/sar -d 60 1 > $TMF
TEST=$(cat $TMF | cut -c10-|
awk '/c0t8d0/||/c0t10d0/ {if($2>85)fl=1}
END {if(fl)print "GO"; else print "STOP"}')
HTH