- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Inerpretaion of an output from top command
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
07-02-2008 02:47 PM
07-02-2008 02:47 PM
Inerpretaion of an output from top command
Unfortunately man pages do not give definition of %CPU nor explain how it was weighted for %WCPU. So far I can not find answer anywhere.
The seems to become even worse because numbers for the LOAD part do not correspond with %CPU or %WCPU for the process. You can see from example from the similar conversation at this forum and I have similar data that average IDLE load is 99.8, while, if you add %CPU, the result is 1.96% or 0.49% as an average between 4 CPUs.
Based on output it seems that top reports utilization by CPU for multi-processors system.
Does anybody have a good idea?
Thanks, Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 04:21 PM
07-02-2008 04:21 PM
Re: Inerpretaion of an output from top command
Rather than make us hunt for it, why not provide a link?
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1223591
You are reading too much into the output of top (and too trusting :-). If you want accuracy you should be using glance.
Note since a process could migrate over multiple CPUs, the process info may not add up for a specific CPU. Also if using threads, it could be included in multiple loads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 04:39 PM
07-02-2008 04:39 PM
Re: Inerpretaion of an output from top command
CPU = Processor number on which the process is
executing (only on multi-processor
systems).
TTY = Terminal interface used by the process.
PID = Process ID number.
PSET = ID of the processor set to which the
processor belongs.This is shown only when -P option is used.
PRI = Current priority of the process
NI = Nice value ranging from -20 to +20
SIZE = Total size of the process in kilobytes.This includes text, data, and stack.
RES = Resident size of the process in kilobytes.The resident size information is, at best,an approximate value.
STATE = Current state of the process. The various states are sleep, wait, run, idl, zomb, orstop.
%WCPU = Weighted CPU (central processing unit) percentage.
%CPU = Raw CPU percentage. This field is used to sort the top processes.
BR/
Yaqub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2008 04:56 PM
07-02-2008 04:56 PM
Re: Inerpretaion of an output from top command
If you extrapolate this metric to a multi-CPU system, say an 8-CPU system, then a load of 8.0 is 8 separate programs consuming 100% of one CPU. A load of 16 would be 16 programs running or waiting to run. Note also that compute-bound programs will context switch several times per second which makes the processes appear to be running at the same time.
It is not unusual in sime situations to a load value 3 to 5 times larger than the number of CPUs. This is often seen with service programs such a daemons that may run dozens of times per second. They run for a very short time but during that time they will consume 100% CPU. Now comes the problem in measuring CPU usage over very long periods of time (like one second which is a long time for the kernel). Context switching can occur 10 times per second so a lot can happen in just a second of time.
top is a legacy application and uses very crude methods to report usage. That's why you need Glance for accurate (and extensive) metrics. top just reports CPU time, not a complete picture at all.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2008 08:32 AM
07-03-2008 08:32 AM
Re: Inerpretaion of an output from top command
Dennis, I am sorry I did not provide a link.
Yaqub, I did not mean that I did not read man pages, rather I wanted to say man pages did not provide much info. For example regarding %WCPU instead of explaining what CPU is it would be better state how it was weighted. and what exactly Raw CPU percentage is. I could guess from output that it is by individual CPU, but for commercial product they could provide full description.
Bill, I was clearly unclear in my question and did not make a point that I am trying to estimate resource CPU utilization by process, something I could not get straight enough from "ps".
I wanted to find if %CPU is actually percent of CPU spent on particular process on this CPU during measurement interval. We are using somewhat similar measurement from sar, but sar combine processes together based on if it either user or system processes.
My concern was and still is as following. If %CPU is percentage of CPU time (on particular CPU in multi-processor system) spent on process, the sum of this measurements for all process divided on number of CPUs should be approximately the same as 100% - average IDLE, as reported in the beginning of top output.
If you check data in Sajjar Sahir post at http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1223591&admit=109447627+1215100789352+28353475 you will see it does not match. It also should match similar results from sar. I compared fields in my system's output and compared it with sar output taken in parallel and results are inconclusive.
So my question is what %CPU in top's output really represents and how reliable it is?
About universal suggestion to use glance. I could not find glance on my system. I tried to run glance from the terminal prompt and got "# glance
sh: glance: not found."
I also tried to find it by name from the root directory and find did not come back with anything.
Thanks, Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2008 03:17 PM
07-03-2008 03:17 PM
Re: Inerpretaion of an output from top command
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2008 03:43 PM
07-03-2008 03:43 PM
Re: Inerpretaion of an output from top command
As Bill said, you have to purchase it. But there is a trial version available on your install CDs. Here are some threads about that:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1229801
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1227264
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1222823
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1199882
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1171844
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1148570
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1046382
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=961506
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=316546