From owner-freebsd-questions@FreeBSD.ORG Fri Sep 15 16:07:56 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB73A16A416; Fri, 15 Sep 2006 16:07:56 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AABD43D46; Fri, 15 Sep 2006 16:07:56 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.6) id k8FG7qv4082239; Fri, 15 Sep 2006 11:07:52 -0500 (CDT) (envelope-from dan) Date: Fri, 15 Sep 2006 11:07:52 -0500 From: Dan Nelson To: Ian Smith Message-ID: <20060915160752.GC55663@dan.emsphone.com> References: <20060914142023.GB91336@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 6.1-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: "Tamouh H." , questions@freebsd.org, Giorgos Keramidas Subject: Re: Top not showing cpu usage even remotely accurately X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 16:07:56 -0000 In the last episode (Sep 15), Ian Smith said: > On Thu, 14 Sep 2006, Dan Nelson wrote: > > I would guess that maybe xmms (or some other threaded app) is your > > hidden CPU consumer. The kernel does not calculate %CPU correctly > > for libkse-threaded programs, and they usually show up as 0% all > > the time. The TIME column does update correctly, though. If you > > switch to libthr with libmap.conf, you'll get accurate threaded > > %CPU reporting. > > I assume then that libkse is what the three multi-thread programs I'm > running (xmms, mozilla-bin and mysqld) are now using, where for each > of them `ldd $program | grep thr` shows > libpthread.so.1 => /usr/lib/libpthread.so.1 > > So can/should I set in (a new) /etc/libmap.conf generally: > libpthread.so.1 libthr.so.1 > libpthread.so libthr.so > > or would it be better to just target these specific programs, eg: > > [/usr/X11R6/lib/mozilla/mozilla-bin/] # assuming loaded with full path? > libpthread.so.1 libthr.so.1 > libpthread.so libthr.so > > Are there any likely downsides to using libthr instead? Esp. mysqld? Ya, libkse was the name of the default thread library before it was renamed to "libpthread". I use a global map (like in your first example) myself. I have a lightly-used mysql database on my machine and haven't noticed any problems with it or any other threaded apps. -- Dan Nelson dnelson@allantgroup.com