kenv - output needed

Garrett Cooper yanefbsd at gmail.com
Tue Mar 23 19:10:53 UTC 2010


On Tue, Mar 23, 2010 at 12:06 PM, Atom Smasher <atom at smasher.org> 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.

Are you looking for data represented similar to sysctl(8)?
Cheers,
-Garrett


More information about the freebsd-hackers mailing list