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/27/2006 17:37:20
Simon Burge wrote:
> YAMAMOTO Takashi wrote:
>
>   
>>> Heck, I'm almost to the point where I've felt I've spent too much time
>>> arguing about this and *I* should just go and convert them all. 
>>>       
>> i'd like to see something like solaris kstat rather than
>> "everything by sysctl".
>> (well, it's on my todo list, but no eta.)
>>     
>
> The current sysctl methods used by the converted kmem grovellers are
> loosely based on ideas from HPUX pstat (I think that was the name).  We
> already had sysctls for kern.proc and others, so I kept the new fetch
> methods under the existing sysctl framework rather than adding a new
> method.
>
> How does kstat differ from what we're doing now?
>
> Simon.
> --
> Simon Burge                            <simonb@wasabisystems.com>
> NetBSD Support and Service:         http://www.wasabisystems.com/
>   

kstats are dedicated for statistics.

You 'snapshot' a set of statistics, at which point the drivers that hold
the the relevant stats (which could be in hardware, and expensive to get
it from s/w) copy the the stats to the snapshot.

This snapshot, which includes a packed form of name/value pairs
(including type information), is then exported to userland.

In theory you could use this for setting tunables, but the interface is
ill equipped for it, and Solaris only uses it for retrieving statistics.

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