Feature #10292
closedAdd percentage unit type to sensor abstraction layer
100%
Description
We've seen some platforms expose IPMI threshold sensors that present an analog reading that represents a percentage value. The set of unit types supported by the sensor abstraction layer in libtopo does not include anything like this. The current set of supported unit types is maintained in an enumeration (topo_sensor_unit_t), and is currently a 1:1 mapping to the unit types enumerated in section 43.17 of the IPMI specification.
This ticket is to extend this topo_sensor_unit_t to include a "percentage" unit. To allow for potentially adding additional unit types from IPMI, should new unit types be added in a future specification, the percentage unit will be offset from what is currently the last element in the enum. i.e. we'll create a gap to allow for future IPMI expansion.
Note - this work has already been integrated into illumos-joyent via the commit below:
commit 76683f77aeee2619b447d8ea5843399835fbc586 Author: Rob Johnston <rob.johnston@joyent.com> Date: Tue Sep 11 22:37:24 2018 +0000 OS-7230 topo_dprintf should evaluate debug mask before forging ahead OS-7228 Add percentage unit type to sensor abstraction layer Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Approved by: Patrick Mooney <patrick.mooney@joyent.com>
So this issue is really to track getting the above commit upstreamed to illumos-gate.
For details on how the change was tested, refer to the SmartOS bug report:
Updated by Rob Johnston over 4 years ago
- % Done changed from 0 to 100
Not sure why this wasn't automatically updated, but this change integrated awhile ago via the commit below:
commit 91e105c6fe74c41aa5fec22b6637fa279c68812a Author: Rob Johnston <rob.johnston@joyent.com> Date: Tue Sep 11 22:37:24 2018 +0000 10292 Add percentage unit type to sensor abstraction layer Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>