Messages in this thread | | | From | "Ed Schouten" <> | Date | Fri, 12 Nov 2004 19:55:33 +0100 | Subject | Re: 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] | |