From owner-freebsd-hackers Thu Nov 4 20:46:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id 71B8E14E09 for ; Thu, 4 Nov 1999 20:46:53 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id UAA01309; Thu, 4 Nov 1999 20:36:36 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199911050436.UAA01309@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Arun Sharma Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kstat - an API for gathering kernel stats In-reply-to: Your message of "Thu, 04 Nov 1999 19:22:52 PST." <19991104192252.A2194@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 Nov 1999 20:36:36 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Thu, Nov 04, 1999 at 06:30:01PM -0800, Mike Smith wrote: > > Sysctl is faster than kstat once you have performed the name->oid > > lookup. There is basically nothing that kstat can do that sysctl can't > > do better and faster, apart from lookup-by-name. > > Can a loadable module, say a network driver register variables with > sysctl ? Can sysctl itself be made a loadable module ? As for the speed, > I don't think it is an issue - I can add another interface for getting > a kstatid and make it fast. Yes and no - sysctl is too central to the operation of the system to become optional. And the only reason I mentioned speed was that you were touting it as a benefit of kstat. > I'm not really saying that kstat is better than sysctl. In fact, it > was an oversight on my part not to look closely at sysctl. My goal > was to get some tools - specifically ktop and xosview to work on > FreeBSD. So I don't particularly care how we get there - if it means > adding a few more variables to the sysctl MIB, so be it. That would be the right way to do it, yes. > Now, if I make those changes and submit a patch, will it be considered > for inclusion ? Sure! -- \\ 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