Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Nov 1999 00:30:06 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Arun Sharma <adsharma@home.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kstat - an API for gathering kernel stats 
Message-ID:  <199911040830.AAA00445@dingo.cdrom.com>
In-Reply-To: Your message of "Wed, 03 Nov 1999 21:56:42 PST." <19991103215642.A31757@home.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I wrote kstat as a way to improve on the current BSD method of getting
> kernel statistics, which involves looking up a particular kernel symbol
> name and then getting the value from the symbol offset. This makes any
> performance monitoring tool or an application that gets kernel stats
> non-portable across different kernel versions if for some reason, the names
> of these variables happen to change.

We have been progressively obsoleting this for some time in favour of 
sysctl, which covers all of the features you're offering and then some.

Probably the only major advantage your implementation has is the direct 
handling of strings as identifiers, rather than the name-to-oid lookup, 
but the cached OID provides a much faster lookup method for values you 
want to get on a regular basis.

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911040830.AAA00445>