openbmc / phosphor-host-ipmid

dbus-based ipmid for host-endpoint IPMI commands
Apache License 2.0
36 stars 72 forks source link

static sensor provide only roundoff value from yaml configuration. #203

Open Logananth-s opened 3 months ago

Logananth-s commented 3 months ago

Hi, I'm using static sensor yaml file configuration. Created yaml file form the dbus paths, but the values from the dbus to ipmitool sensor list is getting round off.

I'm seeing some yaml coefficients in some documentation to get sensor values, (https://github.com/openbmc/docs/commit/64e272ddb59ff3cfca15801fec71c970d2fb36ae?diff=split&w=1) but this calculation are differs from the code path of calculation. Can any suggest one solid formula to use the yaml config coefficients to get the accurate sensor values in ipmitool snesor list.

williamspatrick commented 3 months ago

Created yaml file form the dbus paths, but the values from the dbus to ipmitool sensor list is getting round off.

You realize that IPMI values are always "rounded", right? A sensor in IPMI can only represent 255 different values, which are calculated from the M and B coefficients. Anything outside those 255 distinct values is going to get rounded to the nearest one.

but this calculation are differs from the code path of calculation.

Differs how?