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