-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gateway] Report CPU Tctl as a dimensionless metric (#6656)
Currently, the AMD SP3 host CPU's T<sub>ctl</sub> value is reported to Oximeter as an instance of the `hardware_component:temperature` metric with `sensor = "CPU"`. This metric's unit is in degrees Celsius. This is incorrect. T<sub>ctl</sub> is not a physical measurement from a temperature sensor, but an internal parameter of the CPU's thermal control loop in synthetic dimensionless units that range from 0-100. For details, refer to [this comment][1] and oxidecomputer/stlouis#5. This branch adds a new `hardware_component:amd_cpu_tctl` metric. Unlike the `hardware_component:temperature` metric, this metric has no unit, as it is a dimensionless value. The SP sensor metrics task in MGS has been changed to special-case temperature measurements where the sensor name is "CPU" and the device kind is "sbtsi" so that they are reported using the `hardware_componentamd_:cpu_tctl` metric rather than the `hardware_component:temperature` metric. In the future, I think a more ideologically correct solution to this would be to add a variant to the `gateway_messages::measurement::MeasurementKind` enum to represent dimensionless measurements (or, perhaps, specifically for T<sub>ctl</sub>?), and change Hubris to report the SB-TSI T<sub>ctl</sub> using that instead. However, this looks like it would probably be a somewhat more complex change in Hubris, as the thermal control loop would still need to consider that measurement. This change introduces the new metric type and fixes the problem of us reporting incorrectly-labeled metrics, so I think it's worth handling it this way and then going back and making the Hubris change later. Fixes #6634 [1]: https://github.com/illumos/illumos-gate/blob/fabe1c1dce7b8e0bda70c23798d91f63c2a5a2c5/usr/src/uts/intel/io/amdzen/smntemp.c#L21-L57
- Loading branch information
Showing
7 changed files
with
150 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters