CPU temp incorrect?

Started by Ardentis, November 09, 2025, 02:04:38 PM

Previous topic - Next topic
I show the CPU temperature in the dashboard. It shows around 70C

But the following shows about 35C
sysctl dev.cpu | grep temperature | sed 's/[a-z\.]*/systemp cpu/;s/\.[a-z]*\: /=/;s/.$//'

And this one shows about 47C
sysctl -a | grep temperature | sed 's/[a-z\.]*/systemp cpu/;s/\.[a-z]*\: /=/;s/.$//'

Which of these should I trust? The terminal ones seem a little more correct. If so, which one is more reliable, and how would I fix the erroneous CPU temp on the dashboard?

Thanks

Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

I found a fair few of those posts before posting. Still am not actually sure what the real issue is, I just have an opinion. If I do understand it correctly, it appears that the graph display itself causes considerable momentary millisecond temperature spikes on the CPU, thereby making the CPU temperature always report high. Opinions vary on this being valid implementation or not, both with merit.

My summary: If testing the temperature via GUI alters the temperature by that considerable % (from reasonable to worrying), I am going to remove that small part of the GUI, and get it into another server monitor using MQTT or similar.

Beyond that, the two different commands below also report higher temperatures roughly 10C apart. I m guessing the tiny extra load on the CPU from sysctl -a is causing a few milliseconds where the CPU spikes by 10C over the sysctl dev.cpu.
"
All temperatures are valid for the tiny spec of time that they are taken. So, the most truthful one would be the "sysctl dev.cpu", as it causes the least spike due to the test itself.

In my specific case, I get these (Roughly):
GUI:               70C
sysctl -a:         47C
sysctl dev.cpu:    35C

The difference between 35C and 70C is significant, and if that measurement process raises it by that much, then it is my opinion that while it is 100% truth, it is not really a good measurement tool. In the same way as a non contact thermometer that raised the temperature of the measured surface by 35C. Also, given that the CPU can raise and fall by 35C within a few clock cycles, then maybe monitoring the CPU temperature is irrelevant, useless information, and the temperature cannot really be known. Schrödinger's cat style.

This is my current understanding, recorded for others to find, but could be proven wrong with data...

To be clear, Opnsense is a fantastic product, for which I am very thankful.

As I have probably written in another related thread, assuming your router sits in plain air, measure the ambient air temperature. If it is within specification then you ought to be able to trust the designers. However, it is well known that manufacturers of CWWK boxes can be careless about applying thermal paste properly so if sysctl dev.cpu | fgrep temperature reports high figures on such a box then check it. If it is not high then trust the ambient.

GUI temperature is a guide to changes with activity.
Deciso DEC697

Thanks passeri. Yeah valid. I will stick a DS18B20 on the Protectli and connect it to the esp32 nearby, and mqtt send  that to Home Assistant. That will be good enough for my needs, making sure it is within reasonable temps.

All the other home servers I run have a temperature reading that is very general. No sudden changes like this. This is a Protectli with N100, and that temperature query behaviour is new to me.

Cheers

Good move for temperature sensing. I use a progressively staged fan that kicks in when ambient rises, having a cupboard rather than a proper cabinet for the router and primary switches. You have scope to do that with your microcontroller.

I meant to mention that your discrepancy is much higher than I see. On different boxes I have seen more like 3-15 degree differences between measurement methods, the Deciso 697 being the closest and an N100 4 x 2.5G the worse. I wonder whether the Chinese boxes are simply thermally inferior; as some sort of analogy, they have good capacity to shed heat from the box which is a mass of finned metal, but not at the same rate from the CPU location. It could make sense.
Deciso DEC697

November 10, 2025, 10:05:05 AM #6 Last Edit: November 10, 2025, 10:08:05 AM by meyergru
Not the original question, but the heat transfer of the china boxes are often abysmal and because of bad quality control, differs much from one specimen to the next.

See this for an example (in german, but with telling pictures). When the temps are really bad, I always change the thermal paste. Sometimes, there is not enough pressure between the board and the case.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Quote from: meyergru on November 10, 2025, 10:05:05 AMNot the original question, but the heat transfer of the china boxes are often abysmal and because of bad quality control, differs much from one specimen to the next.

See this for an example (in german, but with telling pictures). When the temps are really bad, I always change the thermal paste. Sometimes, there is not enough pressure between the board and the case.

I +1 for the poor thermal interface of the Chinese boxer.  I have a N5105 I picked up a few years ago.  A Topton, but they pretty much all come from the same manufacturers/suppliers.  Do almost anything and the CPU temps shot to 100C+.

I took it apart (I wasn't shipping back to China).  The heatsink pad where the die makes contact was scratched up, there were burrs around the mounting screw holes, and whatever compound they used was questionable.  I deburred the screw holes, carefully sanded/lapped the heatsink, added a very thin copper shim and put some fresh quality thermal compound on it.  Temps imediately got much better.

I do have a cheap USB powered 120mm fan I sit on top of it, blowing down onto the fins.  Plugs into a USB port for power, and has a switch for the fan speed.  I set it to low, and you can't even hear it.  I don't work the box very hard (home network) but sometime it gets put through its paces (1Gb WAN/2.5 Gb LAN) and temps never get much over 45C.