Subject: Re: vmstat, iostat etc no longer work?
To: Curt Sampson <>
From: Jason Thorpe <>
List: current-users
Date: 11/10/1996 18:47:03
On Sun, 10 Nov 1996 18:37:21 -0800 (PST) 
 Curt Sampson <> wrote:

 > To take your points in reverse order, Jason:
 > > 	(b) We'd have to keep the kmem interface anyhow, because
 > > 	    we don't want to give up looking at kernel port-mortems.
 > I don't know that this counts a a strike against /kern and /proc,
 > since I would never propose giving these up, anyway. It's handy to
 > be able to look at any variable in the kernel one wants to. (Although
 > once a Linux fellow seemed to be claiming that you can indeed get
 > the value of and change any global kernel variable through their
 > /kern filesystem.)

I'm not sure of the value of this... It's nothing different than
what the kmem interface would give you...

 > > 	(a) In order to use them, it requires people to load up
 > > 	    their kernels with kernfs and procfs.  This is bad,
 > > 	    particularly in an "embedded" application.  For example,
 > > 	    we have a couple of NetBSD IPv6 routers here, and the
 > > 	    kernels are lean, but being able to use iostat and
 > > 	    vmstat is good.
 > Would it bloat terribly if we included the ability to do both in
 > these utilities (or #ifdef'd them)? I'm sure that there are people
 > out there regularly recompiling kernels that don't have the time
 > and space to do the whole userland too who would be happy to have
 > a userland that didn't need updates so often.

Well... let's think about this for a sec...

If you're reading actual structs and whatnot from /kern or /proc,
you have the exact same problem as if you'd used kmem, because
the format of a structure may change...

If you read strings from multiple files, then you've:

	- added complexity to the program that needs the data,

	- made the program that needs the data much slower than
	  it needs to be.

In short, you don't gain anything; in fact you lose.

Jason R. Thorpe                             
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939