From owner-freebsd-questions@FreeBSD.ORG Sun Aug 7 18:39:41 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 F1C4416A41F for ; Sun, 7 Aug 2005 18:39:41 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 47E2443DCD for ; Sun, 7 Aug 2005 18:39:39 +0000 (GMT) (envelope-from ph.schulz@gmx.de) Received: (qmail invoked by alias); 07 Aug 2005 18:39:38 -0000 Received: from p54A40938.dip0.t-ipconnect.de (EHLO [192.168.1.35]) [84.164.9.56] by mail.gmx.net (mp003) with SMTP; 07 Aug 2005 20:39:38 +0200 X-Authenticated: #1954550 Message-ID: <42F6341A.3060309@gmx.de> Date: Sun, 07 Aug 2005 18:17:30 +0200 From: "Philip S. Schulz" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050724) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joost Bekkers References: <20050806170133.GA14870@bps.jodocus.org> <42F4F44E.9060804@gmx.de> <20050807075250.GA32158@bps.jodocus.org> In-Reply-To: <20050807075250.GA32158@bps.jodocus.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 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 18:39:42 -0000 Joost Bekkers wrote: > 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). >> [...] > > 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. > So you're looking for a history of the CPU frequency, similar to the history of CPU usage? I don't think the kernel keeps any such statistics. But you should take a look at the man page or possibly the sources of the driver you're using, e.g. est or powernow. > >>>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. > I don't really understand what you mean. What problem are you trying to solve?