Gain,Offset with dbus-sensors values

James Feist james.feist at linux.intel.com
Tue Oct 8 04:26:55 AEDT 2019


On 10/3/19 7:12 PM, Josh Lehan wrote:
> Thanks for asking this. In particular, in PSUsensor it seems there is 
> only an ability to customize the scaling factor for an entire category 
> of sensors at once: InScaleFactor, CurrScaleFactor, PowerScaleFactor, 
> TempScaleFactor, and so on.
> 
> https://github.com/openbmc/dbus-sensors/blob/2adc95cb4d9ac879f66aa9ef12a6ce8b7c1578fe/src/PSUSensorMain.cpp#L408
> 
> Ideally, there would be a way to customize the scaling factor on a 
> per-sensor basis, for example to customize the scaling of Vout without 
> also affecting Vin. >
> Josh
> 
> Josh Lehan | Software Engineer |krellan at google.com 
> <mailto:krellan at google.com> | +1 650-733-8941
> 
> 
> 
> On Thu, Oct 3, 2019 at 5:03 PM Patrick Venture <venture at google.com 
> <mailto:venture at google.com>> wrote:
> 
>     James;
> 
>     We have some sensors that need a gain and offset value set in the json
>     file, for PSU sensors, but only vout/vin or some specific ones, and
>     not applied to all sensors
I'd be fine with this, I've added Cheng to this email who wrote this sensor.

> 
>     Akin to:
>     https://github.com/openbmc/phosphor-hwmon/blob/2227bd52c5bb8d62dcfe33b58d65515d21e9be17/sensor.cpp#L59
> 
>     Also, is there a way to customize the very verbose suffixes
>     PSUsensor applies
>     such as "Temperature" and "Output_Power".  With IPMI we're only

We added this to our oem IPMI so that common words are replaced, so we 
don't hit this issue. 
https://github.com/openbmc/intel-ipmi-oem/blob/4e6ee15b154599046b75e9af76d08828d4fb02b6/src/sensorcommands.cpp#L1375

Maybe this could be added to IPMI in general? It's kind of nice in 
redfish to have the more formal name. Thoughts?


>     granted 16 characters for the name and ipmid uses the last part of the
>     dbus path for the name.
> 
>     Perhaps ipmid should allow overriding the name value.
> 
>     Patrick
> 


More information about the openbmc mailing list