pcp
[Top] [All Lists]

Re: cpu times

To: Madhu Sudhan R Tera <mst9696@xxxxxxxxxxx>
Subject: Re: cpu times
From: Mark Goodwin <markgw@xxxxxxx>
Date: Tue, 30 Apr 2002 18:44:38 +1000 (EST)
Cc: <pcp@xxxxxxxxxxx>
In-reply-to: <Pine.GSO.4.44.0204300332130.15445-100000@pollux.cis.ksu.edu>
Sender: owner-pcp@xxxxxxxxxxx
On Tue, 30 Apr 2002, Madhu Sudhan R Tera wrote:

> Hello All!
> we are working on project which requires calculation
> of %cpu usages for each process running on a particular
> machine.
> So I want to know if the following is correct or not:
> kernel.all.cpu.user + kernel.all.cpu.sys + kernel.all.cpu.idle = sum of
> (proc.psinfo.stime + proc.psinfo.utime)  all processes considered.

It will be fairly accurate, provided you don't include
kernel.all.cpu.idle in the system wide calculation. There
will be some variation because you can't sample all processes
at the same instant in time.

-- Mark


<Prev in Thread] Current Thread [Next in Thread>