From owner-freebsd-hackers Thu Jan 28 16:07:14 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA14288 for freebsd-hackers-outgoing; Thu, 28 Jan 1999 16:07:14 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from panzer.plutotech.com (panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA14269 for ; Thu, 28 Jan 1999 16:07:11 -0800 (PST) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.2/8.8.5) id RAA77048; Thu, 28 Jan 1999 17:07:04 -0700 (MST) From: "Kenneth D. Merry" Message-Id: <199901290007.RAA77048@panzer.plutotech.com> Subject: Re: Device statistics In-Reply-To: <199901282019.VAA06412@zed.ludd.luth.se> from Mattias Pantzare at "Jan 28, 99 09:19:37 pm" To: pantzer@ludd.luth.se (Mattias Pantzare) Date: Thu, 28 Jan 1999 17:07:04 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mattias Pantzare wrote... > > > What's wrong with just looking at the busy_time value that the kernel keeps > > track of? > > That is only updated when busy_count is 0, it may never get uppdated if you put > a high load on the disks (that is realy easy to do...). > > If you take samples every second and the disk get realy bussy 0.5 seconds > after the first sample you will miss half the time that the disk is in use. 0% > instead of the real value 50%. > > You will find that this is the case realy fast if you try to use busy_time. > > So, you have to look at busy_time, busy_coun, start_time and the sample time > to do anyting good of busy_time. True enough. Really, though, I'm not convinced that busy time is a very useful measurement. On any sufficiently busy disk, as you have pointed out, there will almost always be transactions outstanding. > > If you really want an accurate version of the current system uptime, you > > should probably talk to Poul-Henning about it. Providing the current > > uptime is more of a generic service, and not something that would "fit" > > into devstat.. > > Well, not realy. :-) The time that is interesting is when the sample is taken, > not when my program get a chance to get the current system uptime. But a > generic service may be good enough. I think it would be better to have a generic service, if that is what you need. Who knows, there may already be some facility to do it that I don't know about. :) Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message