- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: %CPU usage for a specific process
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
Forums
Discussions
Discussions
Discussions
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
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
11-04-2004 02:20 PM
11-04-2004 02:20 PM
%CPU usage for a specific process
How to calculate the %cpu usage for a particular process.I'm running apache.There are around 16 httpd process running at a given time.I want to find the aggregate of %cpu fot this.Top is not listing the %cpu usage for this process, and the utilisation is very less.Any help will be appreciated.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2004 02:27 PM
11-04-2004 02:27 PM
Re: %CPU usage for a specific process
You can find more information on GlancePlus Pak here:
http://www.openview.hp.com/products/gppak2k/index.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2004 02:32 PM
11-04-2004 02:32 PM
Re: %CPU usage for a specific process
The best way is to use 'measureware'. If you have it, group all 'httpd' processes together as an 'application' in /var/opt/perf/parm file and restart measureware. Once the datacollection is started, you can extract the stats using the command 'extract'. It's a easy-to-use tool. There are some examples in parm file so it shouldn't be a problem for you to configure an additional application.
If you don't have measureware, you can use XPG's version of 'ps' to collect the samples.
UNIX95= ps -C "httpd" -o "pcpu" |sed '1d' |awk '{sum += $1} END {print sum}'
However, customizing measureware is the best solution as you can get quite few metrics in addition to CPU usage.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2004 03:26 PM
11-04-2004 03:26 PM
Re: %CPU usage for a specific process
Thanks for the answer.The command works fine.
I've already configured the gpm and 'm using perfiew to monitor the usage.I wanted my own script to monitor this, and this works fine.
Now I've one more question.When i monitor apache using apache status tool, the cpu load is shown as 80% and the calculated %cpu value using the ps command is 0.21%.
The cpu load sometimes goin to 120% also.So how to interpret the cpu load from apache and %cpu calculated using the command given ?
Thanks,
Bijoy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2004 05:44 PM
11-04-2004 05:44 PM
Re: %CPU usage for a specific process
. pcpu is the time the cpu have been used for the process for the time it has been given the cpu. Due to multi-thread processes, and to the fact, that a line in top is a process (maybe multi-thread), a process can be shown using 120% (one thread using 80% other 40%).
. System load is the number of processes that have been in a running state during the mesure time. 5 processes having a pcpu of 100% during the mesure time will give a load of 500% (5).
Note that for a multi-cpu box, you will have a difference between load and load average, where load average is the average of the loads of each processor.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)