From owner-freebsd-questions@FreeBSD.ORG Sun Aug 7 08:11:19 2005 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 5987516A475 for ; Sun, 7 Aug 2005 08:11:19 +0000 (GMT) (envelope-from joost@jodocus.org) Received: from bps.jodocus.org (g157016.upc-g.chello.nl [80.57.157.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F74644438 for ; Sun, 7 Aug 2005 07:52:52 +0000 (GMT) (envelope-from joost@jodocus.org) Received: from jodocus.org (localhost [127.0.0.1]) by bps.jodocus.org (8.13.3/8.13.1) with ESMTP id j777qoO8032638; Sun, 7 Aug 2005 09:52:50 +0200 (CEST) (envelope-from joost@jodocus.org) Received: (from joost@localhost) by jodocus.org (8.13.3/8.13.1/Submit) id j777qohn032637; Sun, 7 Aug 2005 09:52:50 +0200 (CEST) (envelope-from joost) Date: Sun, 7 Aug 2005 09:52:50 +0200 From: Joost Bekkers To: "Philip S. Schulz" Message-ID: <20050807075250.GA32158@bps.jodocus.org> References: <20050806170133.GA14870@bps.jodocus.org> <42F4F44E.9060804@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42F4F44E.9060804@gmx.de> User-Agent: Mutt/1.4.2.1i Cc: questions@freebsd.org Subject: Re: measuring avg cpu speed while powerd(8) is running 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: Sun, 07 Aug 2005 08:11:20 -0000 On Sat, Aug 06, 2005 at 07:33:02PM +0200, Philip S. Schulz wrote: > Joost Bekkers wrote: > > > >Is there a way to calculate (over eg. a 5 minute interval) the average > >amount the cpu was throttled? In this case by powerd(8). > > No, powerd currently reads the CPU usage periodically and adjusts the > clock speed based on the current CPU idle value. You can somewhat > influence the behavior with the options described in the powerd man page. > powerd does not keep a history of CPU usage and it does not record the > adjustments it makes. However, you could kind of record powerd > activities by starting it with the -v option and redirect stdout to a file. Perhaps I should have said that differently: it is being throttled by powerd. It doesn't have to do the measuring of the average itself. > >I was thinking there might be a counter/timer which is linked to the cpu > >clock, but sofar I haven't been able to find one. > > Well, you can see the current CPU frequency by looking at dev.cpu.0.freq > where 0 is the id of the CPU you want to query. At the times I take measurements the cpu tends to run at 100%, which would result in a nice flat line. -- greetz Joost joost@jodocus.org