From owner-freebsd-current@FreeBSD.ORG Sat Jan 22 22:52:13 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59CCA16A4CE for ; Sat, 22 Jan 2005 22:52:13 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0523643D41 for ; Sat, 22 Jan 2005 22:52:13 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j0MMq7gW024665; Sat, 22 Jan 2005 16:52:07 -0600 (CST) (envelope-from dan) Date: Sat, 22 Jan 2005 16:52:07 -0600 From: Dan Nelson To: "Matthew D. Fuller" Message-ID: <20050122225207.GB33972@dan.emsphone.com> References: <20050122120810.05b8a0e3@Magellan.Leidinger.net> <20050122190211.GA2081@over-yonder.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050122190211.GA2081@over-yonder.net> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: Alexander Leidinger cc: current@freebsd.org Subject: Re: Strange behavior of "top" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 22:52:13 -0000 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