openbmc/phosphor-host-ipmid

IPMI does not display power sensor value correctly

rahulmah opened this issue · 3 comments

IPMI does not display power sensor value correctly.

IPMI displays zero for Lower Critical , Lower Non-Critical , Upper Non-Critical and Upper Critical while for the same sensor IPMI display some value.

bash-4.2$ ipmitool -I lanplus -C 17 -N 3 -p 623 -U root -P 0penBmc -H <BMC_IP> sensor get ps0_input_voltag
Locating sensor record...
Sensor ID              : ps0_input_voltag (0xf7)
 Entity ID             : 10.19
 Sensor Type (Threshold)  : Voltage
 Sensor Reading        : 0 (+/- 0) Volts
 Status                : ok
 Lower Non-Recoverable : na
 Lower Critical        : 0.000               <-------
 Lower Non-Critical    : 0.000           <-------
 Upper Non-Critical    : 0.000           <-------
 Upper Critical        : 0.000                <-------
 Upper Non-Recoverable : na
 Positive Hysteresis   : Unspecified
 Negative Hysteresis   : Unspecified 

For the same sensor Redfish show values correctly

   {
      "@odata.id": "/redfish/v1/Chassis/chassis/Power#/Voltages/8",
      "@odata.type": "#Power.v1_0_0.Voltage",
      "LowerThresholdCritical": 180.0,             <-------
      "LowerThresholdNonCritical": 200.0,      <--------
      "MaxReadingRange": null,
      "MemberId": "ps0_input_voltage",
      "MinReadingRange": null,
      "Name": "ps0 input voltage",
      "ReadingVolts": 205.0, 
      "Status": {
        "Health": "OK",
        "State": "Enabled"
      },
      "UpperThresholdCritical": 300.0,          <-------
      "UpperThresholdNonCritical": 290.0    <-------
    },

BMC FW info:

root@witherspoon:~# cat /etc/os-release
ID=openbmc-openpower
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.10.0-rc1"
VERSION_ID=2.10.0-rc1-dirty
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 2.10.0-rc1"
BUILD_ID="2.10.0-rc1"
OPENBMC_TARGET_MACHINE="witherspoon"

For "while for the same sensor IPMI display some value." did you mean redfish?

For "while for the same sensor IPMI display some value." did you mean redfish?

Oh Yeah.. Typo mistake from my end.

Kostr commented

@rahulmah Do you use dynamic sensor stack or static YAML configuration for IPMI?

Because in the latter case you should provide YAML file with a correct IPMI coefficients for you sensors (M, B, R, ...).
Take a look at the https://github.com/openbmc/openbmc/blob/master/meta-amd/meta-ethanolx/recipes-phosphor/configuration/ethanolx-yaml-config/ethanolx-ipmi-sensors.yaml as an example.

For the coeffs description take a look at the IPMI specification. For the debug inspect this ipmid code

auto rawData = static_cast<uint8_t>((value - sensorInfo.scaledOffset) /