Problems with top and CPU-usage for multi-threaded programs under 2.6

Alex Greg alex.greg at gmail.com
Thu Jun 2 15:25:56 UTC 2005


Hi,


It seems that under the 2.6 kernel (Fedora Core 3), top doesn't show
the CPU usage for multi-threaded programs properly. It appears to show
the correct CPU usage for the main program, but it doesn't show the
CPU for the threads of this program.


This is fine for some programs where the main program is the one that
does the CPU-intensive operations, but for some of our in-house Java
programs, the main program doesn't do anything CPU-wise, but instead
the CPU-intensive operations are done by separate threads.


In this situation, top incorrectly reports the CPU usage of the
program as 0% - this makes it very confusing when running top on the
machine to find out where all the CPU is being used!


Is there any way to change this behaviour, or is this a known issue?


Regards,


-- Alex




More information about the users mailing list