Showing signed sensor value when the command "ipmitool sel elist" is executed
James Feist
james.feist at linux.intel.com
Tue Oct 29 04:16:38 AEDT 2019
On 10/27/19 11:41 PM, Tony Lee (李文富) wrote:
> Hi Jason,
>
> We know that when we execute the command "ipmitool sel elist", it will return something like the following,
> "18 | 10/16/19 | 18:28:41 UTC | Temperature nvme0 | Upper Non-critical going high | Asserted | Reading 72 > Threshold 70 degrees C".
>
> I met a problem that when the sensor value in the d-bus is negative, the current reading in "ipmitool sel elist" will be 0.
> It seems that because the type of scaledValue is defined "uint32_t", there is always a none negative value even current value is a negative value obtained from the d-bus. In
> https://github.com/openbmc/phosphor-sel-logger/blob/master/include/sensorutils.hpp#L159
>
> Is this is an issue or I need to set it up somewhere?
If min is < 0, then this should work:
https://github.com/openbmc/phosphor-sel-logger/blob/6afe9560852c6431c43c8e79a28e2b7cb498e355/include/sensorutils.hpp#L61
https://github.com/openbmc/phosphor-dbus-interfaces/blob/12162be363f11b9dafa92b5379db671712b3523c/xyz/openbmc_project/Sensor/Value.interface.yaml#L28
It uses MinValue < 0 to determine if the sensor is signed or not.
Thanks,
-James
>
> Thanks
> Best Regards,
> Tony
>
More information about the openbmc
mailing list