From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 14 16:15:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A7EC16A41A for ; Mon, 14 Jan 2008 16:15:11 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id A400613C468 for ; Mon, 14 Jan 2008 16:15:10 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JERxn-0005WE-4i for freebsd-hackers@freebsd.org; Mon, 14 Jan 2008 16:15:03 +0000 Received: from 81.210.234.246 ([81.210.234.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jan 2008 16:15:03 +0000 Received: from saper by 81.210.234.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Jan 2008 16:15:03 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Marcin Cieslak Date: Mon, 14 Jan 2008 16:50:12 +0100 Lines: 11 Message-ID: <478B84B4.3010000@system.pl> References: <20080114132440.GA71321@eos.sc1.parodius.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.234.246 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.11) Gecko/20071215 SeaMonkey/1.1.7 In-Reply-To: <20080114132440.GA71321@eos.sc1.parodius.com> Sender: news Subject: Re: Examples of sysctl/sysctlbyname/sysctlnametomib? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 16:15:11 -0000 Jeremy Chadwick wrote: > Does anyone know of some documentation which would help explain how to > walk the sysctl MIB tree for such things as dev.cpu? The sysctl(3) > documentation is not very clear in regards to how to do this, and the > closest thing I can find is what's in src/usr.sbin/powerd/powerd.c. Does sysctl_all() of src/sbin/sysctl/sysctl.c does that what you need? Mightt be easier to iterate a whole subtree and skipping things you don't need. --Marcin