Retrieving information from SMBIOS - page 3

 
Edgar Akhmadeev:

The uuid on my computer matches the hwinfo data exactly. The conversion code is taken from the c++ example.

In hwinfo which one do you have?

I have Wine

But in the /etc/libvirt/qemu/u18.04-MTr.xml file of the host where this VM is spinning:

<domain type='kvm'>
  <name> u18.04-MTr</name>
  <uuid> 1c48eb8c-fd03-4cd4-a3d9-e3133cb57511</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://ubuntu.com/ubuntu/18.04"/>
    </libosinfo:libosinfo>
  </metadata>
 

Can't find the uuid anywhere


 
JRandomTrader:

I have Wine

But in the /etc/libvirt/qemu/u18.04-MTr.xml file of the host where this VM is spinning:

It turns out that in wine SMBIOS does not return an emulated value, but a hardware value. And that's a good thing. Try running hwinfo.

My code took the uuid exactly from the block:

Handle 0x0100, DMI type 1, 27 bytes

which is listed in dmidecode.

 
Vitaly Muzichenko:

Can't find the uuid anywhere


System tab from the Motherboard/SMBIOS DMI tree.
 
Vitaly Muzichenko:

How will it work on UPU and Vine?

Somehow didn't think to check there. On VPS it works, uuid is there and again matches the hwinfo data. While there are small errors in the code, fields are creeping away. Will fix it later today. Newbies wait to test for now.

 

From the command line


From a script

2021.03.23 16:28:41.955 T (EURCAD,H1) UUID: {03000200-0400-0500-0006-000700080009}
 
Edgar Akhmadeev:

Try running hwinfo.


I don't want to drag unnecessary software onto a combat system, especially not a Windows program.

 

All that remains is to remove all unnecessary stuff from the mqh, leaving only the lines for getting the uuid

Ideally, move a few lines into the script itself

 

On a VPS:

2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) System Management BIOS Version: 2.4
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) System BIOS Version: 1.0
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) BIOS Vendor: Seabios
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) BIOS Version: 0.5.1
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) BIOS Release Date: 01/01/2007
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) UUID: {1 b037b14-66 a9-8894-dc89-e5ec77223c29}
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) System Manufacturer: Red Hat
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Product Name: KVM
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Product Version: RHEL 6.6.0 PC
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Product Serial Number: Red Hat Enterprise Linux
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) SKU Number: Red Hat
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Family: CPU 1
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Mainboard Manufacturer: Bochs
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Mainboard Version: DIMM 0
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) 
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) UUID: {1 b037b14-66 a9-8894-dc89-e5ec77223c29}
2021.03.23 17:57:50.344 Test SMBIOS (EURUSD,M1) Product Serial Number: Red Hat Enterprise Linux
 
Edgar Akhmadeev:

On a VPS:

I wish someone had checked the VPS.

Reason: