NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Machinfo struct?



> Sent: Saturday, December 01, 2018 at 7:59 PM
> From: "Don NetBSD" <netbsd-embedded%gmx.com@localhost>
> To: "NetBSD Users Mailing List" <netbsd-users%netbsd.org@localhost>
> Subject: Machinfo struct?
>
> Is there a struct/XML somewhere that describes the hardware
> in the machine much like parsing dmesg might?  I.e., to
> ensure the "current" state hasn't changed from a "desired"
> state?  (boards removed/added, memory complement altered,
> etc.)

You almost surely already know it, but anyway, from a root
shell:

drvctl -lt mainbus0

will produce a tree based on the configuration shown in dmesg.
It is a very elementary information, plain/text and not XML.
However, maybe you could do some scripting to compare this
tree with a previously stored one, and then detect the
possible changes between them.

Rocky


Home | Main Index | Thread Index | Old Index