cipmi

How to retrieve list of fru inventory devices using freeipmi api


I am trying to get FRU inventory device ID list using freeipmi api, but I could only find ipmi_fru_open_device_id method which takes the device's id as an argument.

Also, how do you get the device string name?
Eg:

FRU Inventory Device: FRU_RAM (ID 00h)

I was able to get all the information about a device except it's string name(FRU_RAM).


Solution

  • FreeIPMI maintainer here. The primary "gotcha" if you're not familiar with the IPMI specification is that FRU device IDs and names are stored inside the SDR (sensor data repository). So you actually want to iterate through the SDR via the FreeIPMI "sdr" API for that information.

    I'd recommend going through the source to FreeIPMI's ipmi-fru for guidance. I think most of what you'd want will be in there.