lkml.org 
[lkml]   [2004]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Some ideas about % of CPU for a process
Hello Diego,

On Fri 12 Nov 2004 03:47 PM, Diego wrote:
> I'm trying to define a % of cpu for a process, but i don?t have idea
> about how i can do it. For example, i said that my process need 40% of
> CPU during its lifetime, how can i do it in kernel 2.6?
> Thanks for ideas.

Why don't you 'ps' the process and divide the running time through the
starting time?

time
---------------- = average process cpu usage
(now - started))

Yours,
--
Ed Schouten <ed@il.fontys.nl>
Website: http://g-rave.nl/
GPG key: finger ed@il.fontys.nl
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.113 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site