Date: Thu, 04 Nov 1999 11:49:13 ART From: "Ricardo Bernardini" <rbernardini@hotmail.com> To: freebsd-hackers@freebsd.org Subject: Re: kstat - an API for gathering kernel stats Message-ID: <19991104144914.86528.qmail@hotmail.com>
next in thread | raw e-mail | index | archive | help
I don't think kstat does the same as sysctl, at least for one thing: it provides for a way to dynamically add counters, if there is a way to enumerate them and userland proceses can add their own, it will make a good performance tool. May be I won't have kstat in all my kernels, but it would be good to have it when you are doing some capacity planning. Saludos / Regards Ricardo ----Original Message Follows---- From: Mike Smith <mike@smith.net.au> > 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 +------------------------------+-----------------------------------+ |Ricardo Bernardini | "No entiendo por que todos ponen | |rbernardini@hotmail.com | alguna frase celebre aqui" | |+54-11-4404-4525 | "I don't understand why everybody | |Buenos Aires, Argentina | puts a quote in here" | +------------------------------+-----------------------------------+ ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.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?19991104144914.86528.qmail>