openbmc / ipmi-fru-parser

GNU General Public License v3.0
10 stars 25 forks source link

【ipmitool fru list,can't show FRUID 0 all informations】 #27

Closed Chendd123 closed 4 months ago

Chendd123 commented 7 months ago

use "ipmitool fru list",Missing complete FRUID0 device information in the echo data

root@test-evb:~# ipmitool fru list FRU Device Description : Builtin FRU Device (ID 0) FRU Device Description : motherboard (ID 1) Device not present (Requested sensor, data, or record not found)

root@test-evb:~# ipmitool fru list 0 Chassis Type : Rack Mount Chassis Board Mfg Date : Sun Feb 18 02:35:00 2024 UTC Board Mfg : Biggest International Corp. Board Product : Some Cool Product Product Manufacturer : China OpenBmc Product Name : test S10B316 Product Part Number : 12345789 Product Serial : 12345789 root@test-evb:~# ipmitool fru list 1 Device not present (Requested sensor, data, or record not found)

Chendd123 commented 7 months ago

My phosphor-ipmi-fru gitlog phosphor-ipmi-fru

lxwinspur commented 7 months ago
  1. Check whether the yaml file configuration is correct.
  2. Check whether the device under fruID1 is present (check it through the busctl command).
Chendd123 commented 7 months ago
  1. Check whether the yaml file configuration is correct.

    1. Check whether the device under fruID1 is present (check it through the busctl command). Re->1: test-ipmi-fru.yaml: 0: /system: entityID: 6 entityInstance: 1 interfaces: xyz.openbmc_project.Inventory.Decorator.Asset: BuildDate: IPMIFruProperty: Mfg Date IPMIFruSection: Product Manufacturer: IPMIFruProperty: Manufacturer IPMIFruSection: Product Model: IPMIFruProperty: Model Number IPMIFruSection: Product PartNumber: IPMIFruProperty: Part Number IPMIFruSection: Product SerialNumber: IPMIFruProperty: Serial Number IPMIFruSection: Product xyz.openbmc_project.Inventory.Decorator.Revision: Version: IPMIFruProperty: Version xyz.openbmc_project.Inventory.Item: PrettyName: IPMIFruProperty: Name IPMIFruSection: Product xyz.openbmc_project.Inventory.Item.System: /system/chassis/bmc: entityID: 7 entityInstance: 1 interfaces: xyz.openbmc_project.Inventory.Decorator.Asset: BuildDate: IPMIFruProperty: Mfg Date IPMIFruSection: Board Manufacturer: IPMIFruProperty: Manufacturer IPMIFruSection: Board PartNumber: IPMIFruProperty: Part Number IPMIFruSection: Board SerialNumber: IPMIFruProperty: Serial Number IPMIFruSection: Board xyz.openbmc_project.Inventory.Item: PrettyName: IPMIFruProperty: Name IPMIFruSection: Board xyz.openbmc_project.Inventory.Decorator.Revision: Version: IPMIFruProperty: FRU File ID IPMIFruSection: Board /system/chassis: entityID: 7 entityInstance: 2 interfaces: xyz.openbmc_project.Inventory.Decorator.Asset: SerialNumber: IPMIFruProperty: Serial Number IPMIFruSection: Chassis PartNumber: IPMIFruProperty: Model Number IPMIFruSection: Chassis Model: IPMIFruProperty: Type IPMIFruSection: Chassis 0x01: /system/chassis/motherboard: entityID: 16 entityInstance: 1 interfaces: xyz.openbmc_project.Inventory.Decorator.Asset: BuildDate: IPMIFruProperty: Mfg Date IPMIFruSection: Board SerialNumber: IPMIFruProperty: Serial Number IPMIFruSection: Board PartNumber: IPMIFruProperty: Part Number IPMIFruSection: Board Manufacturer: IPMIFruProperty: Manufacturer IPMIFruSection: Board xyz.openbmc_project.Inventory.Item: PrettyName: IPMIFruProperty: Name IPMIFruSection: Board xyz.openbmc_project.Inventory.Decorator.Revision: Version: IPMIFruProperty: FRU File ID IPMIFruSection: Board test-ipmi-fru-properties.yaml: /system: xyz.openbmc_project.Inventory.Decorator.Cacheable: Cached: 'true' xyz.openbmc_project.Inventory.Decorator.Replaceable: FieldReplaceable: 'true' xyz.openbmc_project.Inventory.Item: Present: 'true' /system/chassis: xyz.openbmc_project.Inventory.Decorator.Cacheable: Cached: 'true' xyz.openbmc_project.Inventory.Decorator.Replaceable: FieldReplaceable: 'true' xyz.openbmc_project.Inventory.Item: Present: 'true' /system/chassis/bmc: xyz.openbmc_project.Inventory.Decorator.Replaceable: FieldReplaceable: 'true' xyz.openbmc_project.Inventory.Decorator.Cacheable: Cached: 'true' xyz.openbmc_project.Inventory.Item: Present: 'true' /system/chassis/motherboard: xyz.openbmc_project.Inventory.Decorator.Replaceable: FieldReplaceable: 'true' xyz.openbmc_project.Inventory.Decorator.Cacheable: Cached: 'true' xyz.openbmc_project.Inventory.Item: Present: 'true' Re-2>:FRUID1 is just one of my tests,Just don't care it
lxwinspur commented 7 months ago

What I mean is to check whether the Present attribute of the xyz.openbmc_project.Inventory.Item interface of all paths under fruID is true. You can check it through the busctl name on the bmc console.

Chendd123 commented 7 months ago

MyFru.txt

Chendd123 commented 7 months ago

What I mean is to check whether the Present attribute of the xyz.openbmc_project.Inventory.Item interface of all paths under fruID is true. You can check it through the busctl name on the bmc console. OK. I double chcek my dbus properties,'system chassis FRUID0' xyz.openbmc_project.Inventory.Item ;They are 'true'; Please,Check 'MyFru.txt'

lxwinspur commented 7 months ago

Okay. please check if there are any abnormal errors reported by ipmid? journalctl -b | grep ipmid

Chendd123 commented 7 months ago

Okay. please check if there are any abnormal errors reported by ipmid? journalctl -b | grep ipmid Please check 'Journalctl_log.txt' Journalctl_log.txt

if don't use fruid0 ,just use fruid1 ,ipmitool fru list,can display all fruid1's informations: root@test-evb:~# ipmitool fru list FRU Device Description : Builtin FRU Device (ID 0) FRU Device Description : bmc (ID 1) Chassis Type : Rack Mount Chassis Board Mfg Date : Fri Dec 29 17:43:00 2023 UTC Board Mfg : xxxxxxxxxxx Board Product : xxxxxxxxxxxx Board Serial : xxxxxxxxxxxxxxxx Board Part Number : 0303K03S Product Manufacturer : China OpenBmc Product Name : Xxxxxxx Xxxxxxx Product Part Number : T5-NS34X-100G-F-HC Product Serial : HNS342208130001F It's so weird!

lxwinspur commented 7 months ago
Mar 09 12:37:00 test-evb ipmid[343]: map::at
Mar 09 12:37:00 test-evb ipmid[343]: map::at
Mar 09 12:37:00 test-evb ipmid[343]: map::at
Mar 09 12:37:00 test-evb ipmid[343]: map::at

I'm not sure if these errors are the cause of this problem, but at least the test on fp5280g3 works fine. Or I suspect that the ipmi_fru_print_all method of ipmitool failed to call ipmi_sdr_get_next_header, so I suggest you refer to these configurations. https://github.com/openbmc/openbmc/tree/master/meta-ieisystems/meta-fp5280g3/recipes-phosphor/configuration/fp5280g3-yaml-config

In addition, after bitbake phosphor-ipmi-host, check whether these files are correct: openbmc/build//tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/phosphor-ipmi-host/1.0+git/phosphor-ipmi-host-1.0+git/scripts

Kostr commented 7 months ago

One of the bytes in the repsonse for the Get Device ID IPMI command is additional device support byte:

Additional Device Support (formerly called IPM Device Support). Lists
the IPMI ‘logical device’ commands and functions that the controller
supports that are in addition to the mandatory IPM and Application
commands.
[7] Chassis Device (device functions as chassis device per ICMB spec.)
[6] Bridge (device responds to Bridge NetFn commands)
[5] IPMB Event Generator (device generates event messages [platform
event request messages] onto the IPMB)
[4] IPMB Event Receiver (device accepts event messages [platform event
request messages] from the IPMB)
[3] FRU Inventory Device
[2] SEL Device
[1] SDR Repository Device
[0] Sensor Device

You need to set bit 3 in this response. In the openBMC it is done via addn_dev_support field in the dev_id.json. Examples: https://github.com/search?q=repo%3Aopenbmc%2Fopenbmc%20addn_dev_support&type=code

If you wonder how this bit is relevant, in ipmitool source code it is checked here: https://github.com/ipmitool/ipmitool/blob/be11d948f89b10be094e28d8a0a5e8fb532c7b60/lib/ipmi_fru.c#L3345C4-L3345C4

Chendd123 commented 7 months ago

One of the bytes in the repsonse for the Get Device ID IPMI command is additional device support byte:

Additional Device Support (formerly called IPM Device Support). Lists
the IPMI ‘logical device’ commands and functions that the controller
supports that are in addition to the mandatory IPM and Application
commands.
[7] Chassis Device (device functions as chassis device per ICMB spec.)
[6] Bridge (device responds to Bridge NetFn commands)
[5] IPMB Event Generator (device generates event messages [platform
event request messages] onto the IPMB)
[4] IPMB Event Receiver (device accepts event messages [platform event
request messages] from the IPMB)
[3] FRU Inventory Device
[2] SEL Device
[1] SDR Repository Device
[0] Sensor Device

You need to set bit 3 in this response. In the openBMC it is done via addn_dev_support field in the dev_id.json. Examples: https://github.com/search?q=repo%3Aopenbmc%2Fopenbmc%20addn_dev_support&type=code

If you wonder how this bit is relevant, in ipmitool source code it is checked here: https://github.com/ipmitool/ipmitool/blob/be11d948f89b10be094e28d8a0a5e8fb532c7b60/lib/ipmi_fru.c#L3345C4-L3345C4

Yeap,i already fix it.Thanks!

Chendd123 commented 5 months ago

One of the bytes in the repsonse for the Get Device ID IPMI command is additional device support byte:

Additional Device Support (formerly called IPM Device Support). Lists
the IPMI ‘logical device’ commands and functions that the controller
supports that are in addition to the mandatory IPM and Application
commands.
[7] Chassis Device (device functions as chassis device per ICMB spec.)
[6] Bridge (device responds to Bridge NetFn commands)
[5] IPMB Event Generator (device generates event messages [platform
event request messages] onto the IPMB)
[4] IPMB Event Receiver (device accepts event messages [platform event
request messages] from the IPMB)
[3] FRU Inventory Device
[2] SEL Device
[1] SDR Repository Device
[0] Sensor Device

You need to set bit 3 in this response. In the openBMC it is done via addn_dev_support field in the dev_id.json. Examples: https://github.com/search?q=repo%3Aopenbmc%2Fopenbmc%20addn_dev_support&type=code

If you wonder how this bit is relevant, in ipmitool source code it is checked here: https://github.com/ipmitool/ipmitool/blob/be11d948f89b10be094e28d8a0a5e8fb532c7b60/lib/ipmi_fru.c#L3345C4-L3345C4

Hi Konstantin,I encountered a very strange problem: 1、ipmit fru list ,can't show “board Extra”&"product Extra",But my eeprom files are saved for them; 2、test:ipmitool fru list

root@test-evb:~# ipmitool fru FRU Device Description : Builtin FRU Device (ID 0) Chassis Type : LapTop Chassis Serial : Biggest International Corp. Board Mfg Date : Thu Apr 11 05:44:00 2024 UTC Board Mfg : Biggest International Corp. Board Product : Some Cool Product Board Serial : cdcdcdcdcdcdcdcd Board Part Number : cb55555555555 Product Manufacturer : Super OEM Company Product Name : Label-engineered Super Product Product Part Number : cb999999999999 Product Version : v1.1 Product Serial : abc123456789

root@test-evb:~# hexdump -Cv /sys/class/i2c-dev/i2c-28/device/28-0050/eeprom 00000000 01 01 03 09 1b 00 00 d7 01 01 02 03 04 0a 0b 0c |................| 00000010 0d 00 00 00 00 00 00 00 01 06 09 cd 63 62 31 31 |............cb11| 00000020 31 31 31 31 31 31 31 31 31 db 42 69 67 67 65 73 |111111111.Bigges| 00000030 74 20 49 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 20 |t International | 00000040 43 6f 72 70 2e c1 00 88 01 12 19 58 f0 e2 db 42 |Corp.......X...B| 00000050 69 67 67 65 73 74 20 49 6e 74 65 72 6e 61 74 69 |iggest Internati| 00000060 6f 6e 61 6c 20 43 6f 72 70 2e d1 53 6f 6d 65 20 |onal Corp..Some | 00000070 43 6f 6f 6c 20 50 72 6f 64 75 63 74 d0 63 64 63 |Cool Product.cdc| 00000080 64 63 64 63 64 63 64 63 64 63 64 63 64 cd 63 62 |dcdcdcdcdcdcd.cb| 00000090 35 35 35 35 35 35 35 35 35 35 35 cd 65 78 61 6d |55555555555.exam| 000000a0 70 6c 65 31 2e 6a 73 6f 6e ce 42 6f 61 72 64 20 |ple1.json.Board | 000000b0 43 75 73 74 6f 6d 20 31 ce 42 6f 61 72 64 20 43 |Custom 1.Board C| 000000c0 75 73 74 6f 6d 20 32 ce 42 6f 61 72 64 20 43 75 |ustom 2.Board Cu| 000000d0 73 74 6f 6d 20 33 c1 40 01 16 19 d1 53 75 70 65 |stom 3.@....Supe| 000000e0 72 20 4f 45 4d 20 43 6f 6d 70 61 6e 79 de 4c 61 |r OEM Company.La| 000000f0 62 65 6c 2d 65 6e 67 69 6e 65 65 72 65 64 20 53 |bel-engineered S| 00000100 75 70 65 72 20 50 72 6f 64 75 63 74 ce 63 62 39 |uper Product.cb9| 00000110 39 39 39 39 39 39 39 39 39 39 39 c4 76 31 2e 31 |99999999999.v1.1| 00000120 cc 61 62 63 31 32 33 34 35 36 37 38 39 d0 41 63 |.abc123456789.Ac| 00000130 63 6f 75 6e 74 69 6e 67 20 44 65 70 74 2e cd 65 |counting Dept..e| 00000140 78 61 6d 70 6c 65 32 2e 6a 73 6f 6e d0 50 72 6f |xample2.json.Pro| 00000150 64 75 63 74 20 43 75 73 74 6f 6d 20 31 d0 50 72 |duct Custom 1.Pr| 00000160 6f 64 75 63 74 20 43 75 73 74 6f 6d 20 32 d0 50 |oduct Custom 2.P| 00000170 72 6f 64 75 63 74 20 43 75 73 74 6f 6d 20 33 c1 |roduct Custom 3.| 00000180 00 00 00 00 00 00 00 cb ff ff ff ff ff ff ff ff |................| 00000190 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000001a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|