Subject: Re: @booted_kernel magic symlink?
To: Simon Burge <simonb@wasabisystems.com>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 04/26/2006 23:33:44
Simon Burge wrote:
> "Garrett D'Amore" wrote:
>
>   
>> Go ahead, tell me which ones folks think are most important, or are
>> hardest to change, and *I'll* fix them.  I don't have any particular
>> opinion myself.  "pkill" and "w" should be particularly easy, since I
>> doubt they need anything that "ps" doesn't already use.
>>     
>
> Good luck on the "1 hour" thing :-)
>
>
>   
Heh.  I might be underestimating, but I don't think by *too* much.

>  - usr.bin/vmstat
>
>     I nearly have vmstat converted to sysctls - I just need to decide
>     how to support machines that haven't switched their interrupt
>     accounting to event counters.
>   
My suggestion is, don't.  Check with core@, but I'd propose going ahead
and breaking this, and asking portmasters to make sure their ports were
using event counters if they want vmstat to report meaningful data...

>  - sbin/ccdconfig
>
>     Directly pokes around looking for CCD info, should be switched to an
>     ioctl maybe?
>   

That would be cleaner, I'd think.  The existence of programs like
*this*, that have no historically good reason I can think of, is why I
don't want to make groveling easy.

>  - usr.bin/fstat
>
>     Grovels for info about different filesystem types.  Needs some VFS
>     level helpers.
>
>  - usr.bin/netstat
>
>     Lots of different networking info gathered.  Matt Thomas had this
>     nearly converted to sysctls at one stage?
>   

Hmm... I wonder why it didn't get committed.  Matt, do you have
something that is nearly complete?

>  - usr.bin/pmap
>
>     Ugg.  Maybe the worst of the grovellers.
>   

By its very nature, I suspect pmap is going to "want" to have access to
some pretty low level details.  This one might be hard to convert.

Solaris exposes this kind of address detail in /proc, e.g.
/proc/$pid/status Then pmap access that.

Would it be okay for pmap to require procfs?  This would could also be
used to prevent non-root users from looking at the process maps of other
programs.

    -- Garrett

>  - usr.sbin/kgmon
>
>     I thought this one was fully sysctl'ised, but looks to have too many
>     kvm hooks left.
>
>  - usr.sbin/pstat
>
>     Traverses vnodes.  Should be a SMOP.
>
>  - usr.bin/systat
>
>     Uses info that netstat, vmstat, etc look for.  Would be the last to
>     be sysctl'd.
>
>  - sbin/savecore
>
>     Discussed a lot here.
>
>  - usr.sbin/trpt
>  - usr.sbin/trsp
>  - usr.sbin/mlxctl
>  - usr.sbin/ifmcstat
>
>     "NFI". mlxctl looks ugly inside, but doesn't seem difficult to
>     change. ifmcstat looks like it should be lumped with netstat maybe?
>
>  - usr.sbin/ntp
>
>     This one's a furphy.  "Move along".
>
> Simon.
> --
> Simon Burge                            <simonb@wasabisystems.com>
> NetBSD Support and Service:         http://www.wasabisystems.com/
>   


-- 
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