From owner-freebsd-current@FreeBSD.ORG Thu Apr 24 13:25:54 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0506C1065670 for ; Thu, 24 Apr 2008 13:25:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 109168FC1D for ; Thu, 24 Apr 2008 13:25:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id AD0471A4D8E; Thu, 24 Apr 2008 06:07:05 -0700 (PDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 24 Apr 2008 09:05:03 -0400 User-Agent: KMail/1.9.7 References: <20080423100759.GA37110@onelab2.iet.unipi.it> <20080423115006.GA37818@onelab2.iet.unipi.it> <20080423153918.GC99910@dan.emsphone.com> In-Reply-To: <20080423153918.GC99910@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804240905.04066.jhb@freebsd.org> Cc: Luigi Rizzo , pluknet , Dan Nelson , current@freebsd.org Subject: Re: reading kernel tunables from userland ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2008 13:25:54 -0000 On Wednesday 23 April 2008 11:39:18 am Dan Nelson wrote: > In the last episode (Apr 23), Luigi Rizzo said: > > On Wed, Apr 23, 2008 at 02:14:02PM +0400, pluknet wrote: > > > 2008/4/23 Luigi Rizzo : > > > > sorry for the possibly naive question, but is there a way other > > > > than sysctl to read the value of kernel 'tunable' variables ? > > > > > > > > E.g. in if_nfe.c i see > > > > > > > > TUNABLE_INT("hw.nfe.msi_disable", &msi_disable); > > > > TUNABLE_INT("hw.nfe.msix_disable", &msix_disable); > > > > TUNABLE_INT("hw.nfe.jumbo_disable", &jumbo_disable); > > > > > > > > but sysctl is reporting none of them. > > > > > > > > I seem to remember that there was a separate command to access > > > > kernel tunables, but cannot remember which one, and neither 'man > > > > -k tunable' nor a google search return any useful answer... > > > > > > Perhaps are you about kenv ? > > > > yes, thanks... > > Is there any reason to have TUNABLE_* macros anymore? A SYSCTL_* macro > with the CTLFLAG_TUN flag does the same thing and also provides sysctl > access. Err, no it doesn't. The flag exists but it is meaningless. -- John Baldwin