How to: Get CPU temp
-
I too have two sensors that can be seen by mbmon in the X6000. I'm not sure which sensor is the CPU but sensor 3 is the highest so that's what I want to know about.
[2.0-RC3][root@pfsense.fire.box]/root(1): mbmon -I Temp.= 36.0, 13.0, 40.5; Rot.= 5769, 5357, 5818 Vcore = 1.15, 2.26; Volt. = 3.38, 5.05, 12.10, -11.87, -0.62
I have to use the -I operator otherwise I get an error message about smb sensors.
If you don't like vi (like me! ;)) then you can use the ee editor instead which is included in pfSense.
Steve
-
I can use 'coretemp' and 'mbmon' from the CLI. Both give a temperature response. They are both different, but at least there's a number. I have changed the appropriate widgets php file, but I'm not getting any temperature read out. I know the changes I made are working, because I can now see the degrees C sign, but no temperature. This makes me think there's something in the php code for the widget that's incorrect. Has anyone else seen this?
Jim
-
Now just turn this all into a handy package we can put in the repo :-)
Really just need the amdtemp and coretemp modules for i386 and amd64 and some code to copy them in place. (We can put those on files.pfsense.org, they don't go into the packages repo.) The widget could be a separate file instead of part of the core system info, would coexist better that way.
You also do not need wget, use fetch, it's built in.
-
Now just turn this all into a handy package we can put in the repo :-)
Really just need the amdtemp and coretemp modules for i386 and amd64 and some code to copy them in place. (We can put those on files.pfsense.org, they don't go into the packages repo.) The widget could be a separate file instead of part of the core system info, would coexist better that way.
You also do not need wget, use fetch, it's built in.
That will be so cool, I am really happy that for now I can see the temp on the dashboard despite I need to reedit after each snapshot, well what I done is have the edited files on the file server so all I need is just to fire up WINscp to copy after an upgrade.
Steen -
If it's built as a package it will re-install automagically after an update. ;D
Which would be nice.Steve
-
If it's built as a package it will re-install automagically after an update. ;D
Which would be nice.Steve
That would be nice, a system information wiget for intel/amd coretemp
-
Plus dash showing temperature for all cores for a multi-core processor. :D
-
Plus dash showing temperature for all cores for a multi-core processor. :D
or at least an avg of the cores? It cracks me up, I have an Atom D510 which has 2 cores but it displays 4 since HT is turned on. Cores 0-1 have the same temp and 2-3 have the same temp.
-
I wouldn't average them, if one core is running hot you'd probably want to know.
-
Hi,
I use as per previous posts coretemp on a D510 CPU.
I done the below change to get the degree symbol.
°;C"; ?>" />
However, for after the first update to the Dashboard (think the update happens each 10 sec.) the degree symbol disappears. Only to come back if/when dashboard is reloaded. Anyone else seen this?I still try to get all four core temp to be shown in the Dashbaord, but no success anyone here got this to work when using coretemp?
Steen
-
Yes I'm seeing that too. Hard to see why it's happening from the code. :-\
Steve
-
Yes I'm seeing that too. Hard to see why it's happening from the code. :-\
Steve
Hi Steve - thanks as then I know I did not do something wrong! ;D
Steen -
I wouldn't average them, if one core is running hot you'd probably want to know.
true…. you would think they would be around the same temp since they are in the same package but i dont know much about the dual/quad core processors.
-
I'm not a programmer but a couple of months ago we had a topic about about supermicro boards with ipmi builts.. http://forum.pfsense.org/index.php/topic,34056.30.html Anyways, I copied the diag_system_activity.php page and change some of the code to display ipmi-sensors. I just did the same with coretemp. Its not on the dashboard but you can access it via the web interface.
Remove the .txt and upload it to /usr/local/www and you can access it via http://pfsense/diag_coretemp.php
To add it to the Diagnostics tab, add this to your config.xml:
<installedpackages>[...] <menu> <name>Core Temps</name> <tooltiptext>Core Temperatures</tooltiptext> Diagnostics <url>/diag_coretemp.php</url> </menu> [...]</installedpackages>
Hi Cino,
Just followed your great writeup and it worked!
As attached screenshot shows.
Thanks!
Steen![pfSense Diag Coretemp sh.jpg](/public/imported_attachments/1/pfSense Diag Coretemp sh.jpg)
![pfSense Diag Coretemp sh.jpg_thumb](/public/imported_attachments/1/pfSense Diag Coretemp sh.jpg_thumb) -
@seh2000 good to hear!! i give all the credit to Scott Ullrich for making the original page.. I just changed some of the code for our needs :-)
-
Yes I'm seeing that too. Hard to see why it's happening from the code. :-\
Steve
Steve,
I am not a programmer, but if I replace the "C" with another symbol or take the "C" away then at the next update it is replaced with a "C" I believe this is from the command sysctl dev.cpu.0.temperature as the return is nn.nC so the degree symbol and the C added to the system_information.widget.php is overwritten, but this is only seen when other symbol in front or after the "C" is added or another letter e.g. "K". If the "C" is ommitted the it is not see when the dashboard is loaded, but appears at the 1st update.
Steen -
just in case you got HTTP ERROR 403 while wget from ptt.4mg.com/pfSense
then try this links
if you are on i386
http://www.ariyako.org/pfsense/coretemp32.zipif you are on AMD64
http://www.ariyako.org/pfsense/coretemp64.zip -
Even better:
http://files.pfsense.org/jimp/tempmon/ -
-
I am not a programmer, but if I replace the "C" with another symbol or take the "C" away then at the next update it is replaced with a "C" I believe this is from the command sysctl dev.cpu.0.temperature as the return is nn.nC so the degree symbol and the C added to the system_information.widget.php is overwritten
It exhibits the same behaviour for me and I'm using mbmon to get the temperature which returns only the temperature, nn.n.
Steve