[ZBX-15967] Zabbix agent unable to read SMBIOS 3.0 Created: 2019 Apr 10  Updated: 2024 Apr 10  Resolved: 2019 May 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 4.2.0
Fix Version/s: 4.0.8rc1, 4.2.2rc1, 4.4.0alpha1, 4.4 (plan)

Type: Problem report Priority: Major
Reporter: Waldemar Faist Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: inventory
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

System Information
Manufacturer: HPE
Product Name: ProLiant DL380 Gen10
Version: Not Specified
Serial Number: ...
UUID: ...
Wake-up Type: Power Switch
SKU Number: 868704-B21
Family: ProLiant


Attachments: File ZBX-15967.patch    
Team: Team A
Team: Team A
Sprint: Sprint 51 (Apr 2019), Sprint 52 (May 2019)
Story Points: 0.25

 Description   

We are running the Zabbix agent 4.2 with root on Ubuntu 16.04. Only on our newer ProLiant Gen10 servers the agent is unable to retrieve any information from system.hw.chassis[].

# zabbix_agentd -t system.hw.chassis[serial]
system.hw.chassis[serial] [m|ZBX_NOTSUPPORTED] [Cannot obtain hardware information.]

Strace gives:

...
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 14), ...}) = 0
open("/sys/firmware/dmi/tables/DMI", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0400, st_size=12327, ...}) = 0
read(4, "\302\5\0\0\21\0\0\307(\1\0+\0\0\200\26 \10\2Q\6\5\0004\0\0\200\26 \2\22R"..., 12327) = 4096
close(4) = 0
write(1, "system.hw.chassis[serial] "..., 105system.hw.chassis[serial] [m|ZBX_NOTSUPPORTED] [Cannot obtain hardware information.]
) = 105
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++

I compared the /sys/firmware/dmi/tables/smbios_entry_point to other hardware we use and it seems to be, that the Gen10 have a SM3 header for SMBIOS 3.0. I think Zabbix agent tries to read the tables as SMBIOS, not supporting SMBIOS 3.0 or not reading the entry point. Fallback to /dev/mem does not happen as it looks like. Dmidecode works fine.



 Comments   
Comment by Edgar Akhmetshin [ 2019 Apr 11 ]

Hello Waldemar,

Thank you for reporting the issue. Could you provide information from /sys/firmware/dmi/tables/ and dmidecode regarding SMBIOS 3.0?

Regards,
Edgar

Comment by Waldemar Faist [ 2019 Apr 11 ]

Hello Edgar,

sure! What do you need exactly?

First info is from my Acer notebook, second from the ProLiant Gen10 server.

hexdump -C /sys/firmware/dmi/tables/smbios_entry_point:

00000000 5f 53 4d 5f 65 1f 02 07 14 01 00 00 00 00 00 00 |_SM_e...........|
00000010 5f 44 4d 49 5f 5f 88 09 00 20 74 9c 21 00 27    |_DMI__... t.!.'|
0000001f
Table address is: 0x9C742000

00000000 5f 53 4d 33 5f 60 18 03 01 01 01 00 27 30 00 00 |_SM3_`......'0..|
00000010 00 10 fc 8e 00 00 00 00                         |........|
00000018
Table address is: 0x8EFC1000

dmidecode gives following header:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
33 structures occupying 2440 bytes.
Table at 0x9C742000.

# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
# SMBIOS implementations newer than version 3.0 are not
# fully supported by this version of dmidecode.
Table at 0x8EFC1000.

dmidecode versions differ on the hosts, but basically dmidecode 3.1 supports SMBIOS 3.1 and dmidecode 3.2 supports SMBIOS 3.2, see https://github.com/mirror/dmidecode/blob/master/NEWS

SMBIOS format itself is defined in https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.2.0.pdf

Let me know if you need a table dump from the SMBIOS 3.1.1 server, but it would be confidential then, since it contains serial numbers of several parts.

Regards,
Waldemar

Comment by Viktors Tjarve [ 2019 Apr 26 ]

Hi Waldemar,

I have added a patch that should fix the issue here. Is it possible for you to recompile Zabbix agent with this patch applied to verify the fixed for your environment?

Kind Regards,
Viktor

Comment by Waldemar Faist [ 2019 Apr 26 ]

Hi Viktor,

thank you for the fast help. I compiled the agent with the patch applied from source, but unfortunately it still cannot obtain hardware information, but the strace changed:

...
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 21), ...}) = 0
open("/sys/firmware/dmi/tables/DMI", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0400, st_size=12327, ...}) = 0
read(3, "\302\5\0\0\21\0\0\307(\1\0+\0\0\200\26 \10\2Q\6\5\0004\0\0\200\26 \2\22R"..., 12327) = 4096
read(3, "\0\1\2\3Unknown \0NOT AVAILAB"..., 12327) = 4096
read(3, "leLOM 1 Port 2\0\0)\v\250\0\1\212\1\0\0\\\0Embed"..., 12327) = 4096
read(3, "|\356$4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0"..., 12327) = 39
read(3, "", 12327) = 0
close(3) = 0
write(1, "system.hw.chassis "..., 105system.hw.chassis [m|ZBX_NOTSUPPORTED] [Cannot obtain hardware information.]
) = 105
exit_group(0) = ?
+++ exited with 0 +++

As far as I can see from the read calls, something may be wrong with the offsets.

Regards,
Waldemar

Comment by Viktors Tjarve [ 2019 Apr 26 ]

You're right Waldemar. I've fixed it and reattached the patch. Could you please test it again?

Comment by Waldemar Faist [ 2019 Apr 26 ]

Beautiful! Thank you!

system.hw.chassis                             [s|HPE ProLiant DL380 Gen10 [serial stripped] Rack Mount Chassis]

Tried another with SMBIOS 3.0.0:

system.hw.chassis [s|FUJITSU PRIMERGY RX2540 M4 [serial stripped] Rack Mount Chassis]

Works like a charm now. Hope it will make it into the next patch release - we depend on official .deb packages.
Not sure if it can be closed now, I'll keep open, feel free to close.

Thanks again, regards,
Waldemar

Comment by Viktors Tjarve [ 2019 May 15 ]

Releases in:

  • 4.0.8rc1 9fec5c97002
  • 4.2.2rc1 1680eeadb44, ba909f24239
  • 4.4.0alpha1 e04d39ce74e, 70b3c02aab6
Generated at Sat Apr 20 17:01:34 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.