Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jan 2005 16:52:07 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "Matthew D. Fuller" <fullermd@over-yonder.net>
Cc:        current@freebsd.org
Subject:   Re: Strange behavior of "top"
Message-ID:  <20050122225207.GB33972@dan.emsphone.com>
In-Reply-To: <20050122190211.GA2081@over-yonder.net>
References:  <20050122120810.05b8a0e3@Magellan.Leidinger.net> <20050122190211.GA2081@over-yonder.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050122225207.GB33972>