From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 12 21:50:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A52E116A400 for ; Wed, 12 Apr 2006 21:50:25 +0000 (UTC) (envelope-from marco@goofy.tols.org) Received: from goofy.tols.org (goofy.demon.nl [83.160.134.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D10343D6B for ; Wed, 12 Apr 2006 21:50:24 +0000 (GMT) (envelope-from marco@goofy.tols.org) Received: from goofy.tols.org (localhost [127.0.0.1]) by goofy.tols.org (8.13.4/8.13.4) with ESMTP id k3CLoL8x002020; Wed, 12 Apr 2006 21:50:21 GMT (envelope-from marco@goofy.tols.org) Received: (from marco@localhost) by goofy.tols.org (8.13.4/8.13.4/Submit) id k3CLoLIZ002019; Wed, 12 Apr 2006 21:50:21 GMT (envelope-from marco) Date: Wed, 12 Apr 2006 21:50:21 +0000 From: Marco van Tol To: freebsd-hackers@freebsd.org Message-ID: <20060412215021.GB1146@tols.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV 0.88.1/1395/Wed Apr 12 18:44:32 2006 on goofy.tols.org X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on goofy.tols.org X-Mailman-Approved-At: Wed, 12 Apr 2006 22:00:36 +0000 Cc: Marco van Tol Subject: Per CPU cpu-statistics under SMP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 21:50:25 -0000 Hi there, My apologies if this is the wrong list to ask this kind of question. I would appreciate a pointer to the correct list if it is please. :) I noticed in the code for gkrellm /usr/ports/sysutils/gkrellm2 that SMP per-cpu statistics were not yet supported under FreeBSD, and decided to check whether I could add that. (I'm running a (dual-core) Athlon64 X2 with FreeBSD 6.1-PRERELEASE) I can't find sample code and/or documentation on how to acquire that information from the kernel. I checked - gkrellm2 itself, which uses kern.cp_time in /src/sysdeps/freebsd.c - top, which also uses kern.cp_time in /usr/src/usr.bin/top/machine.c Some browsing around the internet doesn't get me much further either unfortunately. I keep hitting the per-cpu statistics mentioned with regard to uma(9). Under linux this can be acquired via /proc/stat. (And gkrellm looks realy funky with per-cpu stats, but that may or may not be relevant depending on the reader of this mail I guess ;) Is there an interface under FreeBSD to acquire the necessary per-cpu statistics? Thank you very much in advance, appreciated, Marco van Tol -- Gisteren is het niet gelukt.