Hi,

I have a question about calculating CPU usage for a certain process on Linux. I need to be able to calculate CPU utilization for a process and its threads given a PID or a name. Unfortunately, "top" is slow and my version of "ps" does not support calculating CPU usage in the raw mode. For this particular purpose, I'd like to calculate CPU usage using either system programming or by having some sort of a script that reads through /proc filesystem. Does anybody know how to do this by using any of those or other methods? Many thanks in advance.

--V