ipmitool dcmi power reading do not work
hieuhuynh-ampere opened this issue · 1 comments
hieuhuynh-ampere commented
Hi,
The command dcmi power reading return zero value:
$ ipmitool dcmi power reading
Instantaneous power reading: 0 Watts
Minimum during sampling period: 0 Watts
Maximum during sampling period: 0 Watts
Average power reading over sample period: 0 Watts
IPMI timestamp: Thu Jan 1 00:00:00 1970
Sampling period: 00000000 Seconds.
Power reading state is: deactivated
By adding the power_reading.json with the below content to support power reading:
{
"path": "/xyz/openbmc_project/sensors/power/total_power"
}
And some modify in the source code, now can get the power reading:
$ ipmitool dcmi power reading
Instantaneous power reading: 360 Watts
Minimum during sampling period: 360 Watts
Maximum during sampling period: 360 Watts
Average power reading over sample period: 360 Watts
IPMI timestamp: Thu Jan 1 00:00:00 1970
Sampling period: 00000000 Seconds.
Power reading state is: deactivated
The issue is the total_power return with the double
value, while the ipmitool will report the power reading value with unsigned short value. That way the result always is an integer type.
- How does dcmi power reading adapt with ipmitool?
- Currently, the
Power reading state
always returns with thedeactivated
value. The phosphor-host-ipmid does not handle it.
How to support thePower reading state
?
Thanks,
yuvrajmakkena commented
where should we add power_reading.json ?