cpu usage question

dsr at tao.merseine.nu dsr at tao.merseine.nu
Wed Jan 22 21:59:31 EST 2003


On Wed, Jan 22, 2003 at 09:47:14PM -0500, Brian Medley wrote:
> *** begin question ***
> %CPU  difference between top and ps
> 
> when you do ps -f under the column C it shows the raw CPU time for 
> %CPU
> 
> is their a  difference between this %CPU  and %CPU as shown by top.
> *** end question ***

ps's cpu% is cputime used / realtime the process has been running.

top's %cpu is the percentage of all cpu time used by the process in
relation to all other processes, since the last update.

So, they will be different.

-dsr-

-- 
Network engineer looking for work in Boston area.
Resume at http://tao.merseine.nu/~dsr/



More information about the Discuss mailing list