From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 16:07:17 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 9293E106566B for ; Wed, 23 Apr 2008 16:07:17 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 422558FC23 for ; Wed, 23 Apr 2008 16:07:17 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.2/8.14.2) with ESMTP id m3NFdKYW078171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 23 Apr 2008 10:39:20 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.2/8.14.2/Submit) id m3NFdIZJ078141; Wed, 23 Apr 2008 10:39:18 -0500 (CDT) (envelope-from dan) Date: Wed, 23 Apr 2008 10:39:18 -0500 From: Dan Nelson To: Luigi Rizzo Message-ID: <20080423153918.GC99910@dan.emsphone.com> References: <20080423100759.GA37110@onelab2.iet.unipi.it> <20080423115006.GA37818@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080423115006.GA37818@onelab2.iet.unipi.it> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: pluknet , 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: Wed, 23 Apr 2008 16:07:17 -0000 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. -- Dan Nelson dnelson@allantgroup.com