Subject: vmstat and netstat....
To: None <tech-kern@NetBSD.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 03/26/2006 23:16:37
It was recently pointed out that a few commands (vmstat, netstat)
require a kernel file (/netbsd) in the root filesystem in order to
provide, for example, accurate statistics.

There was also the point recently about how some userland tools could be
made more "port-independent" if they didn't grovel around in memory.  
(E.g. the fact that some tools may be sensitive to a different size for
paddr_t used on different MIPS ports.)

The need for a /netbsd kernel is particularly onerous for some platforms
where disk space is at a premium.

I'm wondering whether there is a compelling reason why we shouldn't
convert new versions of the tools to read these values out of kernfs
special files.  This would provide increased portability and remove the
reliance on having a /netbsd that matches the loaded kernel.

The only drawback I can think of is that  some of these tools operate on
crash dumps, and a kernfs reader wouldn't be able to do that.  If that
functionality is important, could it be provided by gdb scripts or
similar?  And would folks find that an acceptable solution, or is the
ability for these tools to operate on crashdumps themselves an immutable
requirement?  Am I missing something else?

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191