From owner-freebsd-hackers Thu Jan 28 12:19:53 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA07051 for freebsd-hackers-outgoing; Thu, 28 Jan 1999 12:19:53 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from zed.ludd.luth.se (zed.ludd.luth.se [130.240.16.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA07040 for ; Thu, 28 Jan 1999 12:19:47 -0800 (PST) (envelope-from pantzer@sister.ludd.luth.se) Received: from sister.ludd.luth.se (pantzer@sister.ludd.luth.se [130.240.16.77]) by zed.ludd.luth.se (8.8.5/8.8.5) with SMTP id VAA06412; Thu, 28 Jan 1999 21:19:38 +0100 Message-Id: <199901282019.VAA06412@zed.ludd.luth.se> X-Mailer: exmh version 2.0.2 2/24/98 To: "Kenneth D. Merry" cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Device statistics In-reply-to: Your message of "Thu, 28 Jan 1999 13:02:14 MST." <199901282002.NAA75707@panzer.plutotech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Date: Thu, 28 Jan 1999 21:19:37 +0100 From: Mattias Pantzare Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id MAA07045 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. > 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message