Subject: exporting hardware "system ID" by sysctl
To: None <tech-kern@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 10/17/2007 15:54:50
I'd like to export a hardware "system ID" by sysctl (this would also
export system type information where available). Actually, though,
I'd like to export several, since many current systems have a number of
such IDs.
For example, on one of my home systems, I'd have something roughly
like this:
hw.sysid.smbios.bios.vendor=Apple Computer, Inc.
hw.sysid.smbios.bios.version= MM11.88Z.0055.B05.0607191735
hw.sysid.smbios.bios.date=07/19/06
hw.sysid.smbios.system.manufacturer=Apple Computer, Inc.
hw.sysid.smbios.system.product=Macmini1,1
hw.sysid.smbios.system.version=1.0
hw.sysid.smbios.system.serial=YM645830W0A
hw.sysid.smbios.system.uuid=9CFE245E-D0C8-BD45-A79F-54EA5FBD3D97
hw.sysid.smbios.baseboard.manufacturer=Apple Computer, Inc.
hw.sysid.smbios.baseboard.product=Mac-F4208EC8
hw.sysid.smbios.baseboard.version=PVT
hw.sysid.smbios.baseboard.serial=1
hw.sysid.smbios.baseboard.asset-tag=Base Board Asset Tag
hw.sysid.acpi.oemid=APPLE , Apple00,00000055
hw.sysid.acpi.aslid= ,01000013
The SMBIOS data split out above has more stuff available, but it's
either for removable devices, components that usually don't have correct
type or serial number information available in SMBIOS, or (the major
omission above) for the chassis, which is correct on some systems but
wrong on many others, and, at least notionally, shouldn't matter much
to software. I don't really want to write a general-purpose representation
of all of SMBIOS or ACPI's system information in sysctl; rather, I just want
to provide what's easily available and uniquely identifies a system.
I am unsure whether this belongs in hw or machdep. Obviously, different
systems will have different kinds of system-ID data available, but I am
thinking it could all go under hw.sysid, separated by type.
--
Thor Lancelot Simon tls@rek.tjls.com
"The inconsistency is startling, though admittedly, if consistency is to
be abandoned or transcended, there is no problem." - Noam Chomsky