From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 23 19:20:46 2010 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 D0CEF1065675 for ; Tue, 23 Mar 2010 19:20:46 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 8FFC38FC1E for ; Tue, 23 Mar 2010 19:20:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 6A0F07BA9B; Wed, 24 Mar 2010 08:20:44 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a-J8vYAt4kqz; Wed, 24 Mar 2010 08:20:40 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Wed, 24 Mar 2010 08:20:40 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id A2C7E11434; Wed, 24 Mar 2010 08:20:39 +1300 (NZDT) Date: Wed, 24 Mar 2010 08:20:39 +1300 From: Andrew Thompson To: Atom Smasher Message-ID: <20100323192039.GE45454@citylink.fud.org.nz> References: <1003231706140.40436@smasher> <20100323180354.GD45454@citylink.fud.org.nz> <1003240736570.40436@smasher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1003240736570.40436@smasher> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-Hackers Subject: Re: kenv - output needed 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: Tue, 23 Mar 2010 19:20:46 -0000 On Wed, Mar 24, 2010 at 08:06:23AM +1300, Atom Smasher wrote: > On Wed, 24 Mar 2010, Andrew Thompson wrote: > >> On Tue, Mar 23, 2010 at 05:12:47PM +1300, Atom Smasher wrote: >>> i'm trying to figure out what might be reasonable output from kenv. on >>> the three machines that i have access to i'm already seeing wide >>> variations of formatting and usefulness. >>> >>> i'd like to collect as much output as i can get (off-list should be fine) >>> from one of these two commands: >>> >>> 1) preferred: >>> kenv | egrep bios >>> >>> 2) i can also use this: >>> kenv | egrep 'product|maker' >> >> kenv is essentially dumping all the variables set by the bootloader prior >> to starting the kernel. If you want something more structured then maybe >> the dmidecode utility would be useful. > =============== > > structure is cool, but it seems like you're being human-centric in your > reference to structure; i actually want to parse the info with a script, > making kenv preferable. > > i want the ability to run the script without any privileges; again making > kenv preferable. > > so with an unprivileged script, i'm leaning towards kenv to find out what > hardware is running (motherboard & system info, eg "Dell Inc., 0H603H, > PowerEdge 2950" or "Acer, Navarro, Aspire 5100"). > > other than being formatted more nicely (for humans, anyway) and only > running with root privileges, is there any ~real~ difference between the > information i would get from dmidecode rather than kenv (as it relates to > motherboard & system make & model)? it seems like in either case, i'm just > getting the info from smbios... and that info could be good, bad or ugly > regardless of how it's formatted. Yea, both methods get the info from smbios. So back to the original question about reasonable output from kenv, I would expect it to contain all the same basic information that dmidecode fetches. If it is missing something then it is a bug, otherwise that is the data the bios maker has provided and the script will need to handle it. cheers, Andrew