SUMMARY: Correct %CPU usage

From: Vahid Moghaddasi <>
Date: Mon Feb 02 2004 - 22:46:03 EST
Thanks to the following who replied, most people mentioned that
it is not
matter of lying or not, it is just the way %CPU utilization is
calculated on
Sun systems.

Darren Dunham	
Matthew Stier
Thomas M. Payerle
Eric Voisard

Here is Jay Lessert's answer:
On Sun, Feb 01, 2004 at 10:30:46PM -0500, Vahid Moghaddasi
> Hi,
> Is this correct that to get the real CPU usage of a process,
> will have to multiply the %CPU utilization shown by top or
> prstat by the number of CPU's in the system?

That is correct.

> For example, if
> there are 10 CPU's in a system and top shows lets say gzip is
> using %5, that means 5x10=%50 of one CPU.


> I understand top not telling the correct usage on Solaris (it
> on hp-ux) but why prstat is lying?

It is not lying, that is the way it is intended to work, theory
being that:

1)  This is the % system utilization regardless of # of CPU's

2)  Single processes can be multi-threaded; in your 10-cpu
    a single process with 5 threads active could show 50%

As you, I would prefer that process to show 500%  utilization,
and the very first Sun MP kernels worked that way (4.1.x), but
that is not the way it works now.  Perhaps it is a SysV thing.

Get your own "800" number
Voicemail, fax, email, and a lot more
sunmanagers mailing list
Received on Mon Feb 2 22:45:53 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:29 EST