From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 18:23:42 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12DC316A474; Thu, 12 Jul 2007 18:23:42 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E051013C4BB; Thu, 12 Jul 2007 18:23:41 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AEBFE1A4D87; Thu, 12 Jul 2007 11:23:41 -0700 (PDT) Date: Thu, 12 Jul 2007 11:23:41 -0700 From: Alfred Perlstein To: Paul Saab Message-ID: <20070712182341.GG45894@elvis.mu.org> References: <20070711172600.GO45894@elvis.mu.org> <46966F79.30203@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46966F79.30203@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: exporting subr_param values as sysctls 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: Thu, 12 Jul 2007 18:23:42 -0000 * Paul Saab [070712 11:14] wrote: > Alfred Perlstein wrote: > >I would like to export the various parameters from subr_param.c > >into sysctl, these nodes would include the names from the following > >tunables as well as others in these files. > > > > TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); > > dfldsiz = DFLDSIZ; > > TUNABLE_ULONG_FETCH("kern.dfldsiz", &dfldsiz); > > maxdsiz = MAXDSIZ; > > TUNABLE_ULONG_FETCH("kern.maxdsiz", &maxdsiz); > > dflssiz = DFLSSIZ; > > TUNABLE_ULONG_FETCH("kern.dflssiz", &dflssiz); > > maxssiz = MAXSSIZ; > > TUNABLE_ULONG_FETCH("kern.maxssiz", &maxssiz); > > sgrowsiz = SGROWSIZ; > > TUNABLE_ULONG_FETCH("kern.sgrowsiz", &sgrowsiz); > > > >any objections? > > > >I don't see any obvious way to get at these values on a running > >system. > > Do it, but you can get them via kenv.. ;) only if set from the loader, right? -- - Alfred Perlstein