On Fri, 24 Feb 2006, yahav wrote:

> During a benchmark on our application we need to monitor the cpu usage per
> process. I tried to do it with top.
> When I'm loading the system I can see that the total cpu usage on the
> machine is increasing while no specific process show that it consumed this
> cpu.

don't sum thins up and think this is everything.

1. if you have a lot of short processes created and killed, they'll effect
the "total CPU usage" but you won't see them in top since they die quicker
the top refreshes.

2. if you want to monirot things across time, don't use top. write a
5-lines shell script that runs 'ps auxww', sleeps for X seconds and
repeats this in a loop. write the output to a file and then analyze it.

neither way will allow you to catch often-created processes. for this you
might turn on process accounting (psacct is the package name, i think)
which will log every processes created on the system (when it terminates),
and the time it took to run (possibly also CPU usage - i don't remember).
this way you'll catch any created process, and wil be able to try and find
who are these invisible ghosts taking your CPU time.

> I'm sure that the processes that run are consuming cpu.
> BTW, I can see the increasing of memory usage per process.
>
> The os version that I'm using is : (uname -a) Linux rhas4-dl360-x86-129
> 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64
> GNU/Linux

unrelated to this issue - you might want to install redhat's updates on
your machine (latest kernel is 2.6.9-22.0.2.EL, i think) if it doesn't
conflict with other packages you use.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to