I just upgraded from 5 to 6 and it went smooth. I am really liking the new settings and the speed. One little thing that did not change over was the CPU temp. It registered fin in 5 but is not avaialbe in 6. I have pihole install on a baremetal machine running debian 11 and lm-sensors reports the cpu temp as it should. I have dug through all the files trying to find where this gets its info. Can anyone help so I can fix it?
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
pihole -d
Here you go.
The info is sourced from /sys/class/hwmon
In v5 we also used /sys/class/thermal/thermal_zone0/temp
Pinging @DL6ER if we should re-add the latter.
Makes sense. So if your hardware is not using HWMON it will return null?
There should be nothing in thermal_zone
that isn't also in hwmon
as it is basically the same kernel interface[1]. The kernel documentation explicitly states:
The libsensors library offers an interface to the raw sensors data through the sysfs interface. Since lm-sensors 3.0.0, libsensors is completely chip-independent. It assumes that all the kernel drivers implement the standard sysfs interface described in this document.
[...]
Each chip gets its own directory in the sysfs
/sys/devices
tree. To find all sensor chips, it is easier to follow the device symlinks from/sys/class/hwmon/hwmon*
.
We intentionally went away from thermal_zone0
as it sensor was often enough reporting rather low (~ 30°C) temperatures and some random samples revealed them being case or fan sensors. There is nothing anywhere specifying that the first (or, actually, "zeroth") has to be the CPU die sensor so - most often - it was pure luck in previous versions of Pi-hole.
To depend less on "luck", Pi-hole v6.0 has this code, actively trying to infer the most appropriate sensor:
and I guess we simply need to add another string here. But that's also what the v6 beta is for!
@Jay_Jarrett Please first run
pihole checkout ftl new/list_sensors
and then post the output of
pihole-FTL --sensors
here.
Well, except, of course, if your kernel is built without
hwmon
support but - even then - it should be available as module. ↩︎
Got a bit of an error. "Requested option "new/list_sensors" is not available
". Also I noticed the other metrics were wrong as well. The CPU is only reading 50% of what it should be. This is actually running on a unifi cloudkey gen2 with all the unifi stripped out. I am running a script that takes the cpu usage, memory load and temp from lm-sensors and displaying it on the front lcd. Thats how I discovered the CPU load was wrong in pihole. Thanks for the help.
Whoops! The command is missing a word. Try:
pihole checkout ftl new/list_sensors
The update installed just fine, but I am still not getting the temp reading. The Memory and the CPU are correct now. I did notice that my CPU reading is not in the standard place. The correct path for this cloudkey is /sys/class/thermal/thermal_zone18/temp. and it spits out a 4 digit number that has to be parsed to celsius.
This is the code that I use to read and adjust to human readable text.
RAW_TEMP=$(cat /sys/class/thermal/thermal_zone18/temp)
CPUTEMP=$(echo "scale=1; $RAW_TEMP / 1000" | bc)°C
Can you paste the output of the command?
root@PiHole:~# pihole-FTL --sensors
{
"list": ,
"cpu_temp": null,
"hot_limit": 0,
"unit": "C"
}
This is just the command sensors
root@PiHole:~# sensors
xo_therm-virtual-0
Adapter: Virtual device
temp1: +0.0°C
xo_therm_buf-virtual-0
Adapter: Virtual device
temp1: +0.0°C
tsens_tz_sensor0-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor1-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor2-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor3-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor4-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor5-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor6-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor7-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor8-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor9-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor10-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor11-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor12-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor13-virtual-0
Adapter: Virtual device
temp1: +0.4°C
tsens_tz_sensor14-virtual-0
Adapter: Virtual device
temp1: +0.3°C
tsens_tz_sensor15-virtual-0
Adapter: Virtual device
temp1: +0.3°C
pm8953_tz-virtual-0
Adapter: Virtual device
temp1: +35.4°C (crit = +145.0°C)
battery-virtual-0
Adapter: Virtual device
temp1: +20.0°C
The cpu temp sensor is "pm8953_tz-virtual-0"
Thanks
Yes, this confirms your kernel has been built without hwmon
support. This is too bad but I don't think there is much we should do about it.
Yes, sorry, I haven't seen this before.
Sure, we could hack in thermal_zone
handling for exactly this case but hwmon
is really a default kernel module which actively has to be removed. lm-sensors
reads all possible sources but it is an entire library with exactly this purpose. Pi-hole shows the temperature merely because "it always has". The justification for keeping this is ... questionable. Sure, to some extend one can argue that a high temperature will lead to throttling which, in turn, may affect DNS performance at any point - so does overall CPU utilization and memory usage on the system running Pi-hole. This is still not really a top-class justification and too weak IMO to try to make a fit for everyone even on very exotic configurations.
Sorry to say it like that but it's also honest how I'm thinking about it. This is not a "it will not happen", it's more a "I'm not looking at investing my volunteers free time into coding this". But it's also not meant to be "if someone does it we will merge this without questioning the rationale"
Something happemed last night and all of a sudden its showing again. Go figure. Yall are doing a great job, and I know you cannot make it fit everyone. Just wanted to give some feedback.
This topic was automatically closed after 19 hours. New replies are no longer allowed.