-
Notifications
You must be signed in to change notification settings - Fork 800
CPU temperature reporting in dashboard #6911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
isn't the attribute The dashboard executes |
Yes the commands should read the same atributes, this is why is confusing to me :), HW is ok, box is mostly idle since its just sits with default install, no peaking loads on the CPU issued both commands inside 1 sec window; root@OPNsense:~ # configctl system temp root@OPNsense:~ # sysctl dev.cpu | grep temperature Issuing command sysctl dev.cpu | grep temperature* multiple times i can see that sometimes for half a second temperature spikes verry briefly, but mostly is at 35 - 36. Out of 20 displays in a row i see 1 spike over 40. It looks that command sysctl -a| grep temperature* or configctl system temp just reads this spikes or max values and reports them, although attribute is the same. |
The execution might just influence the reading, both sets of information are the same, but reading all sysctl values takes more cycles. Likely not much we can do about that, could be very hardware specific as well. |
I would hazard to say having the ever-refreshing dashboard displayed causes tons more system load in itself. |
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
There can be a mis-match between the CPU temperature reported by the operating system and the CPU temperature shown in the OPNsense dashboard. This happens for N100, N200 and possibly other CPU types. The issue seems to be that the sysctl -a command (which returns around 14,000 lines of output) causes a short-lived spike in CPU temperature. This spike causes an elevated temperatue value to be reported in the dashboard. Avoiding "sysctl -a" means that the dashboard temperature matches the OS reported temperature. Current script: # /usr/local/opnsense/scripts/system/temperature.sh dev.cpu.0.temperature=46.0C . . . With this change: # ./temperature.sh dev.cpu.0.temperature=40.0C . . . This issue was previously reported here: opnsense#6911
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Im testing new Intel N200 box, and came across interesting issue with CPU temperature reporting. My fanless box is practically cool to touch, but CPU temp in OPNSense is reporting 45 degrees, that it seemd to me too much. So I did some digging.
If I log in console and issue sysctl dev.cpu | grep temperature, I got more realistic CPU temp
sysctl dev.cpu | grep temperature
dev.cpu.3.temperature: 35.0C
dev.cpu.2.temperature: 35.0C
dev.cpu.1.temperature: 36.0C
dev.cpu.0.temperature: 35.0C
I checked what command is OPNSense using for temp sensors and its sysctl -a | grep temperature, this temp is also reported in dashboard.
sysctl -a | grep temperature
hw.acpi.thermal.tz0.temperature: 27.9C
dev.cpu.3.temperature: 45.0C
dev.cpu.2.temperature: 45.0C
dev.cpu.1.temperature: 44.0C
dev.cpu.0.temperature: 43.0C
If I stress test the machine this 2 temps come together at 55 degrees after 30 min witch is ok.
I installed HTOP and check the temp there, the lower values are reported, with occasional spike above 40 but average at 36 - 37 degrees.
I live booted linux on the same machine and checked linux temp sensors .. they are also reporting average of 36 - 38 degrees.
Out of curiosity I also spin up pfsense, and temp was also ok .. no spikes above 40 degrees. - but pfsense is using different command to read cpu temp then opnsense, I think sysctl dev.cpu | grep temperature
Overall this is not life threatening situation 😊 😊, but only my observation I decided to post it here. According to my testing both temps are correct higher temp is actually achieved by CPU when short load hits it, but it lasts less then a second and it falls to 36 degrees. It looks to me that the command sysctl -a | grep temperature is displaying max values in certain period, averaging in higher temp in dashboard that it really is.
I also searched the forum, and few similar post have already been posted;
https://forum.opnsense.org/index.php?topic=34395.msg166556#msg166556
Maybee you could revise the temp monitoring and maybe use sysctl dev.cpu | grep temperature, if it reports more "real" CPU temp, or maybee I'm missing something obvious here...I also dont understand why 2 different commands output up to 10 degree difference.
A clear and concise description of what the bug is, including last known working version (if any).
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce
Steps to reproduce the behavior:
sysctl dev.cpu | grep temperature
sysctl -a | grep temperature
observe the difference
Compare dashboard temp with htop temp in console
Expected behavior
Real temperature of CPU cores
Describe alternatives you considered
None
Screenshots
If applicable, add screenshots to help explain your problem.
Relevant log files
If applicable, information from log files supporting your claim.
Additional context
Add any other context about the problem here.
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 19.1.1 (amd64, OpenSSL).
Intel® Xeon™ E3-1225V5 3.3Ghz Quad Core
Network Intel® I210-AT
The text was updated successfully, but these errors were encountered: