Subject: Re: ps vs /proc
To: None <current-users@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 02/24/2000 12:12:01
[ On Thursday, February 24, 2000 at 15:15:50 (+0100), PER4MANCE, J. Dolecek wrote: ]
> Subject: Re: ps vs /proc
>
> I wanted to work on this, too, but didn't find time up to now
> and I have other projects to do now :( It would be really neat
> if someone would take this project and implemented clean
> sysctl interface.
The sysctl(2) interface is somewhat broken for the purpose of looking at
dynamic kernel tables such as the proc table and those that it points
to. Its not SNMP-like in enough ways. Sysctl(2) can and does return
binary complex structures, but in order to avoid the problems being
discussed this would have to be prevented -- all structures would have
to be broken down into tables with individual entries of well known base
types. There is a reason why good SNMP MIBs are as pedantic as they are
about breaking things down into their smallest components.
The current implementation in NetBSD is also badly in need of major
overhaul before it's internally exstensible just like a real SNMP MIB
without having to hack header files (eg. just as one doesn't really have
to write a MIB before doing the implementation). There was a
half-hearted attempt to fix this in FreeBSD at one point, but I didn't
see that even their implementation would be any easier to use for
dynamic table structures.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>