Public bug reported:

Currently, when logging in to a system with launchpad-common installed,
the sysinfo command shows system information which is quite useful,
however, the temperature zone function seems to iterate through sysfs
and simply reports the sensor with the max temperature value. This
theoretically is useful, however, AUXTIN (PSU sensors) are often in the
70-80 degree range, which overrides the more interesting temperature,
like CPU (providing an actual indicator of load/excessive CPU usage).

Outputting the values of the get_thermal_zones Temperature class, I can
see it shows the path the sensor in sysfs and the name is the
dynamically generated name of the hwmon sensor set i.d. (hwmon4),
instead of the value of the name file in the sysfs folder (if it exists)
in the hwmon/sysfs sensor directory.

What I would like to see is an ability to whitelist or blacklist hwmon
tempeartures by the sysfs name file value and/or the ability to
whitelist sensors by the actual sensor label i.e. name = k10temp, label
= Tctl. Ideally, we could configure this using the /etc/landscape config
file.

Here is the source code in Ubuntu 25.04 server:

$ cat /usr/lib/python3/dist-packages/landscape/sysinfo/temperature.py
from twisted.internet.defer import succeed

from landscape.lib.sysstats import get_thermal_zones

class Temperature:
    def __init__(self, thermal_zone_path=None):
        self._thermal_zone_path = thermal_zone_path

    def register(self, sysinfo):
        self._sysinfo = sysinfo

    def run(self):
        temperature = None
        max_value = None
        for zone in get_thermal_zones(self._thermal_zone_path):
            if zone.temperature_value is not None and (
                max_value is None or zone.temperature_value > max_value
            ):

                temperature = zone.temperature
                max_value = zone.temperature_value
        if temperature is not None:
            self._sysinfo.add_header("Temperature", temperature)
        return succeed(None)

** Affects: landscape-client (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2126868

Title:
  landscape-client: Ability to scope reported temperature sensor on
  sysinfo command

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/2126868/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to