Re: Strange behavior of "top"

From: Dan Nelson <dnelson_at_allantgroup.com>
Date: Sat, 22 Jan 2005 16:52:07 -0600
In the last episode (Jan 22), Matthew D. Fuller said:
> On Sat, Jan 22, 2005 at 12:08:10PM +0100 I heard the voice of
> Alexander Leidinger, and lo! it spake thus:
> > It tells me that 23% of CPU are used by userland processes. But I
> > only see 1.5% used in the process listing. The galeon-bin process
> > shows alot of used CPU time (for this small uptime), and I wouldn't
> > be surprised if it is the galeon process which is eating the
> > majority of the CPU resources (I have ~85 tabs open with content),
> > but I object to the 0% CPU display then.
> 
> Aren't threaded processes still not showing CPU usage stats?

Yes.  The only way to tell whether a libpthread-threaded process is
consuming CPU is to watch the TIME column in top or ps and see if it's
incrementing.  You can also switch to libc_r or libthr via libmap.conf,
both of which should correctly report CPU (although libc_r is going to
be slower, and libthr is not as stable as libpthread).

A possible workaround for this might be to have top inspect the
process' rusage struct and display that in the CPU% column.

-- 
	Dan Nelson
	dnelson_at_allantgroup.com
Received on Sat Jan 22 2005 - 21:52:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC