From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 7 07:38:44 2004 Return-Path: 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 5E93116A4CE for ; Sun, 7 Mar 2004 07:38:44 -0800 (PST) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C55F43D1F for ; Sun, 7 Mar 2004 07:38:43 -0800 (PST) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id i27FcdxU031449; Sun, 7 Mar 2004 17:38:39 +0200 (EET) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.9p2/8.12.9) id i27FYiFP003549; Sun, 7 Mar 2004 17:34:44 +0200 (EET) (envelope-from netch) Date: Sun, 7 Mar 2004 17:34:44 +0200 From: Valentin Nechayev To: ticso@cicely.de Message-ID: <20040307153444.GA1355@iv.nn.kiev.ua> References: <20040303062730.GK44313@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040303062730.GK44313@cicely12.cicely.de> X-42: On Organization: Dark side of coredump cc: freebsd-hackers@freebsd.org Subject: Re: how to get cpu states more than once a second? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2004 15:38:44 -0000 Wed, Mar 03, 2004 at 07:27:31, ticso (Bernd Walter) wrote about "how to get cpu states more than once a second?": BW> Currently I get the states via kern.cp_time, but this only allows BW> a granularity of a single second and I need something around 50-100ms. BW> Application is a LED bargraph which doesn't have the intended effect BW> with just a single update per second. Real granularity for its is statclock rate (on x86, usually 128 or 1024). But one should know that short period states are too inexact; there is interferention between periodic states and statclock rate which can lead to temporary distortions; e.g. inadequately high interrupt time reporting during 1-2 seconds. -netch-