[lm-sensors] [PATCH v2] Add support for new attributes to libsensors and to the sensors command
Guenter Roeck
guenter.roeck at ericsson.com
Mon Jan 9 01:14:27 CET 2012
Hi Jean,
On Sun, Jan 08, 2012 at 04:45:02PM -0500, Jean Delvare wrote:
> Hi Guenter,
>
[ ... ]
> >
> > static const struct sensor_subfeature_list power_inst_sensors[] = {
> > + { SENSORS_SUBFEATURE_POWER_AVERAGE, NULL, 0, "avg" },
>
> I'm confused. This one was missing on purpose. For power sensors we
> consider instantaneous and averaging sensors as different types. The
> code in function print_chip_power is pretty clear about this. So, just
> as all _INPUT subfeatures aren't listed in limit arrays,
> SENSORS_SUBFEATURE_POWER_AVERAGE must not be listed.
>
I looked this up again.
The idea was to support display of both instantaneous power and average power
if both is provided by the chip/driver.
With the above, this is displayed as follows:
power: 55mW (avg: 50mW, highest: 70mW)
In other words, average power is displayed as limit, similar to lowest/highest values,
if instantaneous power is supported as well. If not, it is still displayed as before.
power: 50mW (highest: 70mW)
Do you have a better idea how to handle this case ?
Thanks,
Guenter
More information about the lm-sensors
mailing list