From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 23 19:10:52 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 ED090106566B; Tue, 23 Mar 2010 19:10:52 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id B9F0C8FC18; Tue, 23 Mar 2010 19:10:52 +0000 (UTC) Received: by pvc7 with SMTP id 7so2233847pvc.13 for ; Tue, 23 Mar 2010 12:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LbAqk59DHG+DDZ/1XMtar/qlpm46BBYY/fc/4TNZY/A=; b=k/n5B3v6HjjRb2CxAaUQIluWWxidqcSCKEx1omkeiPoaEZw0N/OxQKuKO0C2CN0Gbg ylOhIwQ0SRqnr2BC1x301T0GNbbFCCMXExHBflprb8DPxVPUXexJMkAYyatJjVXNUFOH 4ulWw6YyCrwFxZODuViRBB4sCzPfmriMua3gk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=b/rmxljYgcKZxv6iUXcOKb2Vpli3SZZwOgE8VzfzStltrlWS/F+UV6vAp7ChbElOg9 sYfxZI66/hpbEkN+cdLUj0vX6p9QR8X/p1Z916QxPS2hCn9ZDNO6iBPYNjeL1535Q4Xi ns7OC1mr3VOWwwR9PUXgkSuAAfPlnk71gDeGw= MIME-Version: 1.0 Received: by 10.114.87.9 with SMTP id k9mr7382970wab.222.1269371452213; Tue, 23 Mar 2010 12:10:52 -0700 (PDT) In-Reply-To: <1003240736570.40436@smasher> References: <1003231706140.40436@smasher> <20100323180354.GD45454@citylink.fud.org.nz> <1003240736570.40436@smasher> Date: Tue, 23 Mar 2010 12:10:52 -0700 Message-ID: <7d6fde3d1003231210s38ec9419r5149fa7af6f5bd2b@mail.gmail.com> From: Garrett Cooper To: Atom Smasher Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-Hackers , Andrew Thompson 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:10:53 -0000 On Tue, Mar 23, 2010 at 12:06 PM, 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 variat= ions >>> of formatting and usefulness. >>> >>> i'd like to collect as much output as i can get (off-list should be fin= e) >>> from one of these two commands: >>> >>> 1) preferred: >>> =A0 =A0 =A0 =A0kenv | egrep bios >>> >>> 2) i can also use this: >>> =A0 =A0 =A0 =A0kenv | egrep 'product|maker' >> >> kenv is essentially dumping all the variables set by the bootloader prio= r >> to starting the kernel. If you want something more structured then maybe= the >> dmidecode utility would be useful. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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 runn= ing > with root privileges, is there any ~real~ difference between the informat= ion > 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 o= f > how it's formatted. Are you looking for data represented similar to sysctl(8)? Cheers, -Garrett