How to: Get CPU temp
-
How does one get this module loaded on every boot?
Add the line:
coretemp_load="yes"to /boot/loader.conf.local
Create the file if necessary. That file is copied across a firmware update, however the kernel module will not be (i think).Steve
Edit: corrected syntax
-
How does one get this module loaded on every boot?
I found that the system information widget almost has temperature built in.
Edit the following files:
/usr/local/www/includes/functions.inc.php
That's pretty cool! :)
-
Can we get this functionality added to future snapshots.. especially amd64 ?
-
@asterix I agree, this is nice little feature!! if yoru hardware supports it
@RedRep and i thought my box was hot at 52c
I noticed coretemp reads 52 but my IPMI sensor show 57… Who is correct? I wonder if the BIOS screen would read something different
but either case, its good to to have on the dash...
-
There's surely some reason that isn't included already?
What happens if coretemp isn't loaded?Steve
-
There's surely some reason that isn't included already?
What happens if coretemp isn't loaded?Steve
let see, i ran kldunload coretemp then looked at the dash… its in the dash but only reads C
I loaded it up and it showed on the dash without refreshing the page :-)
-
Right, so it needs some code to stop it showing "temperature C" if you don't have the right hardware/driver installed.
Steve
Edit: Should be °C if you ask me. ;)
-
Right, so it needs some code to stop it showing "temperature C" if you don't have the right hardware/driver installed.
Steve
Edit: Should be °C if you ask me. ;)
There is a function in functions.inc.php for that; I will add that functionality tonight after work. I also grabbed the coretemp module for the amd release which I will upload somewhere as well. On an iPad right now though. :(
@RedRep and i thought my box was hot at 52c
It is completely fanless. :)
-
Eagerly waiting for the amd64 coretemp module !! ;D
Keeping myself ready for the change.. I am getting the below error.
[2.0-RC3][admin@pfsense.localdomain]/boot/kernel(5): pkg_add -r wget
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.1-release/Latest/wget.tbz… Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.1-release/All/libiconv-1.13.1_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.1-release/All/gettext-0.18_1.tbz... Done.
[2.0-RC3][admin@pfsense.localdomain]/boot/kernel(6): wget http://encodable.com/uploaddemo/files/pfsense/coretemp.ko
wget: Command not found.Not sure why my wget command isin't working? Is this too 32/64 bit sensitive? I have amd64 installed.
Maybe "fetch" would work.. but not sure what would be the precise syntax for it to download the coretemp.ko file.
Edit:
Nevermind.. I used File Manager to upload the file for testing. Doesn't work..lol. Will wait for the amd64 version. -
You have to issue a rehash after you've added a package so Freebsd knows where to find it. Or reboot.
[2.0-RC3][root@pfsense.fire.box]/root(1): rehash
Steve
-
Aah I see. Thanks for the info. Not much of a FreeBSD user so learning every day.
Can't wait to try the amd64 coretemp.
-
My N270 is 52-55C in a totally passively cooled solution (Lanner netapp).
-
http://encodable.com/uploaddemo/files/pfsense/coretemp.ko-amd64
AMD64 version -
Thank you !!
-
It's working !!
[2.0-RC3][admin@pfsense.localdomain]/root(1): sysctl -a | grep temperature
dev.cpu.0.temperature: 59.0C
dev.cpu.1.temperature: 54.0C
dev.cpu.2.temperature: 57.0C
dev.cpu.3.temperature: 51.0CAdded to local.conf to auto load at boot.. yeehaa !!!
Now how do I make the temp show up at the main system information for all 4 cores?
-
Right, so it needs some code to stop it showing "temperature C" if you don't have the right hardware/driver installed.
Steve
Edit: Should be °C if you ask me. ;)
agreed…. I did try to add ° but it didn't like it.... Figure we need ANSI code or something for it to display in the widget
-
Hi RedRep,
I'm very interested in your way to get CPU temperature.
Unfortunately, The link you indicate to download the coretemp.ko package is no more available.
I'm trying to get it from another URL but no success.Could you put it on pfsense forum or sharing website like megaupload ?
It would be very nice.
thank you very much.
-
Uploaded the AMD64 version to here
http://www.megaupload.com/?d=628LSQRC
I don't have the 386 version but I do have a long term unlimited megaupload account so if someone sends it to me I can upload it for others to use as well.
-
I downloaded the AMD64 8.1 iso from the freebsd FTP servers.
Opened it with WinRAR and browsed to the /boot/kernel/ folder and dragged and dropped "coretemp.ko" into a WinSCP session connected to pfsense.
Edited the file properties to 555. (r-xr-xr-x)
Done! -
Any ideas on why I cannot get the main screen to show my tmeps?
Aug 5 17:16:45 kernel: p4tcc1: <cpu frequency="" thermal="" control="">on cpu1
Aug 5 17:16:45 kernel: p4tcc0: <cpu frequency="" thermal="" control="">on cpu0</cpu></cpu> -
Just tested on my 2 pfSense Boxes, ATOM D510 & AMD X2 5600+ and works fine ;D
Thanks RedRep, GoldServe, stephenw10 & Tikimotel
If someone needs, here are the coretemp ( i386 ) & amdtemp ( amd64 )
( just remove the txt ext )
-
I would love to see this officially added to pfsense.
However, what about multi core cpus? -
Thanks for a fun thread.
My AMD Geode is 44 C just in case anyone is interested. A jetway board in a matx case.
-
Superb work guys !!
Now 2 things added to this will make it even more kewl !! :D
- Add a degree (°) before the C
- Show all cores temp on the dash
-
Superb work guys !!
Now 2 things added to this will make it even more kewl !! :D
- Add a degree (°) before the C
- Show all cores temp on the dash
1. Change line 240 in /usr/local/www/widgets/widgets/system_information.widget.php
from" />
to
" />
2. Working on that, but this code:
function has_temp() { $numcores = ""; exec("/sbin/sysctl -A | grep temperature | wc -l", $dfout); $numcores = trim($dfout[0]); if($numcores == "0") { return false; } else { return true; } }
Will check to see if you have temperatures reporting and trigger it to show the temps. Having it show all of the cores separately will take more work - I'm no coder but I will give it a shot. :)
Any ideas on why I cannot get the main screen to show my tmeps?
Aug 5 17:16:45 kernel: p4tcc1: <cpu frequency="" thermal="" control="">on cpu1
Aug 5 17:16:45 kernel: p4tcc0: <cpu frequency="" thermal="" control="">on cpu0</cpu></cpu>What is the output of sysctl -a | grep temperature
-
@RedRep Nice work!
-
@RedRep: u da man !!
This code needs to be incorporated in the future 2.0 snapshots. Who can make it happen?
If there is a function defined to do the following..
- auto check if mobo supports temp monitor
- If yes.. execute the coretemp.ko functions, make it to auto load on boot and display the temp in (degree) C for all cores on the dash
- If not.. hide the Temperature field from the dash.
-
GREAT POST!
Followed the steps showed in the post.
However I ran into a small issue.
I am on 2.0-RC3 (i386) built on Fri Aug 5 12:14:15 EDT 2011I downloaded the i386 coretemp.ko.txt from the post here, removed the txt extension.
Copied the file (coretemp.ko) to /boot/kernel/
Made sure the rights were set to 555
Ran the command kldload coretemp and got this error:Fatal trap 12: page fault while in kernel mode
Cupid = 0; apci id = 00
Fault virtual address = 0x3afaf300
Fault code = supervisor write, page not present
Instruction pointer = 0x20:0xc70dcf13
Stack pointer = 0x28:0xeed30988
Frame pointer = 0x28:0xeed309b0
Code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, press 1, def32 1, gran 1
Processor eflags = interrupt enabled, resume IOPL = 0
Current process = 25901 (kldload) -
Does anyone else have this issue? Someone mind hosting two 8kb kernel extensions?
-
You can try from here: http://ptt.4mg.com/pfSense/
-
The problem could be that the kernel modules attached to a post in this thread used the .txt extension.
For some reason this causes a problem when they are downloaded corrupting the file.
If you attach binaries with the .png extension this won't happen.Steve
-
@ptt:
You can try from here: http://ptt.4mg.com/pfSense/
Hi ptt - thanks - but when I try to download fro the link then this:
Forbidden
Host:
You do not have permission to access this page or file
The extension 7z is currently not supported by FreeServers.
If you think there is an error or you wish to have the extension 7z added to the mime definitions, please take the time to notify customer support.
Thank you for using FreeServers.Steen
-
The problem could be that the kernel modules attached to a post in this thread used the .txt extension.
For some reason this causes a problem when they are downloaded corrupting the file.
If you attach binaries with the .png extension this won't happen.Steve
Thanks Steve, where from can I then get the file?
Cheers Steen -
Here is the coretemp.ko file from FreeBSD 8.1 release (386).
Remove the .png extension. The file should be 8054 bytes.Steve
-
Greatly sorry, changed to zip, now is OK ( http://ptt.4mg.com/pfSense/ )
You have:
coretemp32.zip–> inside amdtemp.ko & coretemp.ko ( FreeBSD-8.1-RELEASE-i386 )
coretemp64.zip--> inside amdtemp.ko & coretemp.ko ( FreeBSD-8.1-RELEASE-amd64 )
-
Here is the coretemp.ko file from FreeBSD 8.1 release (386).
Remove the .png extension. The file should be 8054 bytes.Steve
Hi Steve!
BINGO!
IT WORKS!
Thanks so much!
Steen -
@ptt:
Greatly sorry, changed to zip, now is OK ( http://ptt.4mg.com/pfSense/ )
You have:
coretemp32.zip–> inside amdtemp.ko & coretemp.ko
coretemp64.zip--> inside amdtemp.ko & coretemp.ko
Hello ptt!
Many thanks!
As per other post it now works for me!
Steen -
OK, as attached shows dashboard now shows my CPU temp. ;D ;)
Thanks to everyone here!
Steen![Screenshot pfSense Dashboard w Temp.jpg](/public/imported_attachments/1/Screenshot pfSense Dashboard w Temp.jpg)
![Screenshot pfSense Dashboard w Temp.jpg_thumb](/public/imported_attachments/1/Screenshot pfSense Dashboard w Temp.jpg_thumb) -
@ptt:
Greatly sorry, changed to zip, now is OK ( http://ptt.4mg.com/pfSense/ )
You have:
coretemp32.zip–> inside amdtemp.ko & coretemp.ko ( FreeBSD-8.1-RELEASE-i386 )
coretemp64.zip--> inside amdtemp.ko & coretemp.ko ( FreeBSD-8.1-RELEASE-amd64 )
Thank you for hosting them :)
-
Hi Guys,
I'm still trying to make the coretemp module working but it seems I'm doing something wrong because it still doesn't work :'(.
I extracted the coretemp.ko from the FreeBSD 8.1 distribution iso and put it to /boot/kernel through a SCP connection authenticated as root.
run the kldload command and tried the command sysctl -a | grep temperature but it returns nothing.I had no error when typing "kldload coretemp" so it should works !!!
My pfsense box is a Watchguard Firebox X700 hardware which runs on Intel Celeron 1200MHz.
This CPU should be supported by coretemp no ?Please Help me.
Thanks in advance for your support.