Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking at the output of top.

top - 16:11:19 up 31 days, 2:37, 10 users, load average: 17.01, 16.99, 17.00

Tasks: 470 total, 18 running, 452 sleeping, 0 stopped, 0 zombie

Cpu(s): 76.5%us, 0.0%sy, 0.0%ni, 23.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

Several questions about CPU usage:

(1) is "us" part in the third line same as "load average/number of cores" or something I heard people mentioned "CPU utilization"?

(2) for the us part, "man top" says

us -- User CPU time

     The time the CPU has spent running users’ processes that are not niced.

What are "processes that are not niced"?

(3) some says "CPU utilization" is a better measurement than load average. So how to get "CPU utilization"? If I sum up the %CPU column for all processes, is that "CPU utilization" or something else different than "CPU utilization * number of cores" and load average?

Thanks and regards!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

First, a couple of sources:
* Top: Linux Command,
* nice article on top usage patterns.

(1) is "us" part in the third line same as "load average/number of cores" or something I heard people mentioned "CPU utilization"?

the "us" field shows CPU Time in User Mode. See CPU Modes.

What are "processes that are not niced"?

A process "niceness" is an internal numeric value that essentially defines how nice a process is being to the CPU. A low priority process, that sleeps and takes very few processing power (cycles) when active is a "nice" process.
Niceness can be positive or negative. A negative niceness is a process that is demanding more priority and taking more cycles. Not nice at all. A positive niceness is a process taking few cycles, sleeping most of the time and having low priority. Very nice. See Nice.

So the "us" field shows you how much CPU time the negative niceness (the not nice) user mode processes are taking. To see the "niced" processes look at the "ni" field.

(3) some says "CPU utilization" is a better measurement than load average. So how to get "CPU utilization"? If I sum up the %CPU column for all processes, is that "CPU utilization" or something else different than "CPU utilization * number of cores" and load average?

To see the CPU utilization, look at the "id" field. This is the idle time. CPU utilization is thus, 100 - id.

share|improve this answer
1  
Note that I purposely avoided the initial question at (3). I respectfully disagree with what you have been hearing. They have different purposes and thus should be used for what they were meant. I couldn't have it said any better than what you will read here: en.wikipedia.org/wiki/… –  A Dwarf Oct 3 '09 at 23:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.