Score:0

In landscape-sysinfo change cpu temp from celsius to fahrenheit

jm flag

I would like for Landscape-sysinfo to display the cpu temp's in Fahrenheit instead of Celsius. Does anyone know how to accomplish this? I assume that the temperature reading is coming from /lib/python3/dist-packages/landscape/sysinfo/temperature.py. Below is the contents of that file. Thanks in advance for your help.

from twisted.internet.defer import succeed

from landscape.lib.sysstats import get_thermal_zones

class Temperature(object):

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)
Score:0
hu flag

I followed the code example in this post. https://ubuntuforums.org/showthread.php?t=1516573

On Ubuntu 22.04 the file location was here:

sudo nano /usr/lib/python3/dist-packages/landscape/sysinfo/temperature.py
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.