From owner-freebsd-hackers Tue Jan 12 20:03:04 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA11083 for freebsd-hackers-outgoing; Tue, 12 Jan 1999 20:03:04 -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 UAA11046 for ; Tue, 12 Jan 1999 20:02:58 -0800 (PST) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.9.1/8.8.5) id VAA49342; Tue, 12 Jan 1999 21:01:57 -0700 (MST) From: "Kenneth D. Merry" Message-Id: <199901130401.VAA49342@panzer.plutotech.com> Subject: Re: what was the old devstat interface's dk_wds? In-Reply-To: <40018.916184080@axl.noc.iafrica.com> from Sheldon Hearn at "Jan 13, 99 01:34:40 am" To: axl@iafrica.com (Sheldon Hearn) Date: Tue, 12 Jan 1999 21:01:57 -0700 (MST) Cc: 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 Sheldon Hearn wrote... > > Hi folks, > > I'm trying to teach sysutils/xosview about the new kernel device > statistics interface so that its DiskMeter will work for CURRENT. At the > moment, it expects FreeBSD to use "the older method" for pulling device > statistics out of the kernel. > > I'm getting to grips with devstat(3) and the source for iostat, but I > still need to understand how "the older method" worked, so that I can > translate what xosview wants to do into what it should do. > > I would greatly appreciate it if someone could help me with one of the > following: > > 1) A pointer to the devstat(3) manpage's predecessor. I don't think there was a predecessor. You'll have to read the source. Check out a -current from sometime before Sept. 15th, 1998. > OR > > 2) An explanation of the timeframe context for a comment like this one > from STABLE's /usr/include/sys/dkstat.h: > > extern long dk_wds[DK_NDRIVE]; /* # blocks of 32*16-bit words transferred */ > > It's the number of 32*16-bit words transferred since when? Since boot, I believe. One of the problems with that is that it's a 32 bit signed value on i386, and so would probably wrap every so often on a server with a lot of I/O going on. devstat uses 64 bit counters, so it's much more difficult for them to wrap. There are a couple of other ports that use the devstat code, in addition to systat(1), vmstat(8), and iostat(8). Check out xperfmon, and xsysinfo. I think they both support devstat. If you've got questions, just ask. I wrote the devstat code. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message