diff --git a/source/core.py b/source/core.py index 5d2be4f..3d2c104 100644 --- a/source/core.py +++ b/source/core.py @@ -477,10 +477,17 @@ def sysinfo(): print("\nTemperature for each physical core:\n") core_num = 0 while core_num < core_temp_num: - if "coretemp" in core_temp: - temp = core_temp['coretemp'][core_num].current - else: - temp = core_temp['acpitz'][0].current + temp = float("nan") + try: + if "coretemp" in core_temp: + temp = core_temp['coretemp'][core_num].current + elif "k10temp" in core_temp: + # https://www.kernel.org/doc/Documentation/hwmon/k10temp + temp = core_temp['k10temp'].current + elif "acpitz" in core_temp: + temp = core_temp['acpitz'][0].current + except: + pass print(f"CPU{core_num} temp: {temp:.0f}°C") core_num += 1