[pve-devel] [PATCH v2 18/22] auto-installer: fetch: add gathering of system identifiers and restructure code

Aaron Lauterer a.lauterer at proxmox.com
Wed Feb 21 17:07:45 CET 2024



On 2/21/24 15:09, Christoph Heiss wrote:
> While looking at this and reading the `dmidecode` manpage a bit, it
> looks like everything collected here is also available under
> /sys/devices/virtual/dmi/id as separate files, e.g.
> 
>      # ls /sys/devices/virtual/dmi/id/
>      bios_date        chassis_asset_tag    product_name
>      bios_release     chassis_serial       product_serial
>      bios_vendor      chassis_type         product_sku
>      bios_version     chassis_vendor       product_uuid
>      board_asset_tag  chassis_version      product_version
>      board_name       ec_firmware_release  subsystem
>      board_serial     modalias             sys_vendor
>      board_vendor     power                uevent
>      board_version    product_family
> 
> Most of these file are even world-readable, just some (e.g. *_serial)
> need root to read. So it could be a simple list of filenames to read
> from there.
> 
> So that could be a nice alternative to calling and parsing the
> `dmidecode` output. The names of the files would also serve as good keys
> for matching. Maybe you already considered it? Just wanted to throw this
> in there.
> 
> Not everything seems to be available there, e.g. "Boot-up State", "Power
> Supply State" and "Thermal State", but at least everything which is
> interesting to identify machines uniquely seems to be there.

I did not check where dmidecode gets the info from. Thanks! This sounds even more suitable and easier to implement :)
And AFAICT that should be all that is interesting to identify a system.




More information about the pve-devel mailing list