- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: unix performance monitoring script
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
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
тАО01-11-2007 10:23 PM
тАО01-11-2007 10:23 PM
unix performance monitoring script
i am in bit prob..can u help me to write a script in unix (can use perl also) to monitor
(please don't need any tools...only script)
1.disk usage
2.cpu usage
3.memory usage
in every 10 seconds(for example)..
it should display the three usage result in screen in every 10 seconds.
it will be better if there is an option for user to set the monitoring time also..
pls help guys...
--------------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 10:55 PM
тАО01-11-2007 10:55 PM
Re: unix performance monitoring script
below two of the command that i have bookmarked:
pid of process consuming most CPU displayed on stdout:
# UNIX95= ps -e -o "pcpu,pid" | sort -n -k1 | tail -1 | awk '{print $2}'
pid of process consuming most memory displayed on stdout:
# UNIX95= ps -e -o "vsz,pid" | sort -n -k1 | tail -1 | awk '{print $2}'
will try to find some more.
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 11:00 PM
тАО01-11-2007 11:00 PM
Re: unix performance monitoring script
below a few commands that i have recorded from one of SEP's posts:
sar -qM 1 600 > /tmp/perf_info.report &
sar -uM 1 600 > /tmp/perf_info.cpu &
sar -b 1 600 > /tmp/perf_info.buffer &
sar -d 1 600 > /tmp/perf_info.disk &
sar -w 1 600 > /tmp/perf_info.swap &
sar -v 1 600 > /tmp/perf_info.inode &
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2007 11:08 PM
тАО01-11-2007 11:08 PM
Re: unix performance monitoring script
so can u write the total script to explain whole thing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 05:30 AM
тАО01-12-2007 05:30 AM
Re: unix performance monitoring script
Use the existing utility called watch.
For example:
watch -n 3 "ls -la"
will show the output of ls -la updated every 3 second.
Simply pass the commands Yogeeraj gave you (without redirecting them into a file if you want to see the output on STDOUT) as arguments instead of "ls -la".
Please also assign points...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 02:09 PM
тАО01-12-2007 02:09 PM
Re: unix performance monitoring script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-12-2007 06:00 PM
тАО01-12-2007 06:00 PM
Re: unix performance monitoring script
invoke the script as follows
watch -d -n5 "sh ./Monitor_ex.sh"
Enjoy life
Jean-Pierre Huc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2007 07:22 PM
тАО01-14-2007 07:22 PM
Re: unix performance monitoring script
5 19 * * 1-5 /usr/lib/sa/sa2 -A &
(man pages)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2007 11:38 PM
тАО01-15-2007 11:38 PM
Re: unix performance monitoring script
but i actually need a script after running that cpu, memory and disk usage will be shown in display screen concurrently changing with time..
pls send me the script