From owner-freebsd-hackers Thu Jan 28 12:02:27 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA04134 for freebsd-hackers-outgoing; Thu, 28 Jan 1999 12:02:27 -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 MAA04116 for ; Thu, 28 Jan 1999 12:02:23 -0800 (PST) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.2/8.8.5) id NAA75707; Thu, 28 Jan 1999 13:02:14 -0700 (MST) From: "Kenneth D. Merry" Message-Id: <199901282002.NAA75707@panzer.plutotech.com> Subject: Re: Device statistics In-Reply-To: <199901281954.UAA05490@zed.ludd.luth.se> from Mattias Pantzare at "Jan 28, 99 08:54:38 pm" To: pantzer@ludd.luth.se (Mattias Pantzare) Date: Thu, 28 Jan 1999 13:02:14 -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... > > > > That means that I can't use the current time to subtreact from boot time, as > > > that won't give the same time... > > > > > > If getmicrouptime was recorded in devstat when the sample is taken that > > > would work to (even better). > > > > If you look at last_comp_time, that's the time of the most recent > > transaction completion, as reported by getmicrouptime(). > > That time is not helping me. To calculate the percent of busy time I have to > account for the ongoing transaction from start_time to the time that the > sample was taken. The time of the most recent transaction is only relevant if > it happend when I took my sample. What's wrong with just looking at the busy_time value that the kernel keeps track of? 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.. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message