HOWTO: Temperature Monitoring with coretemp in Sysinfo widget
-
Thanks!! I followed your instructions and successfully added temperature display to sysinfo. ;) :D ;D
It seems that there is a "}" omitted in /usr/local/www/includes/functions.inc.php for the statement "switch(get_hwtype()) { …" in your post. ???I just changed cpu to core, since my system display one more value.. :o
-
Thanks!! I followed your instructions and successfully added temperature display to sysinfo. ;) :D ;D
It seems that there is a "}" omitted in /usr/local/www/includes/functions.inc.php for the statement "switch(get_hwtype()) { …" in your post. ???I just changed cpu to core, since my system display one more value.. :o
Glad it worked for you :)
There is no } omitted. I posted the file modifications in the patch format, that means:- switch(get_hwtype()) { - default: - return;
Is to be removed.
The first character in each line means:
(nothing) = Do nothing, leave everything as is.
(minus) = remove this line.
[+] (plus( = insert this line.marked lines from the code in my post you should have your file. :)
(If you did everything right)You can check for your additional value with:
sysctl -a | grep temperature
This will show you what it is. Maybe your board has a pwm sensor or a nb sensor too.
-
I finally discover a { without+- under the for loop, sorry for that~ :o
"sysctl -a | grep temperature" shows:
hw.acpi.thermal.tz0.temperature: 26.8C dev.cpu.0.temperature: 40.0C dev.cpu.1.temperature: 40.0C dev.cpu.2.temperature: 45.0C dev.cpu.3.temperature: 45.0C
If 26.8C indicate CPU temp by another sensor, it seems core temp should be more accurate… :o very big difference indeed :'(
-
Just configured this on my 2.0.1 amd64 install and its working perfectly 8)
Thanks!
-
Give me your whole file after the patch was applied and I can tell you what went wrong.
Usually something like this is caused by applying a patch to another version of the file. Mine was 2.0.1 amd64, so if you apply the patch to anything else, it is likely to break if the file has changed and you just blindly apply the patch :)Hello,
sorry but I was very busy, I send tot you a pm with the file. It's the same version.
Thanks -
Hi!
I've done exactly like U wrote but it doesn't work…
I attached my files so u can look if there is something wrong. I'm not getting any errors in any case.But when I'm running sysctl -a | grep temperature it doesnt do anything…
[2.0.1-RELEASE][root@pfsense.localdomain]/root(14): sysctl -a | grep temperature [2.0.1-RELEASE][root@pfsense.localdomain]/root(15):
I've allready wrote kldload coretemp but if I'm doing it again it will just print a message: File exists
[2.0.1-RELEASE][root@pfsense.localdomain]/root(15): kldload coretemp kldload: can't load coretemp: File exists
What's wrong? :)
-
If you don't get a sysctl value at the command line the widget will never work.
What cpu do you have?Steve
-
If you don't get a sysctl value at the command line the widget will never work.
What cpu do you have?Steve
AMD Athlon 64 X2 Dual Core Processor 6000+
-
-
-
Yes, the name is a little ambiguous. Glad it worked I've not ever run it myself. ;)
Steve
-
Works as described, I patched manually. Thanks great work show-p1984!
-
I tried this on my system, but it did not work :(. I have a AMD Athlon XP 3200+ and I used the amdtemp.ko module.
Any sugestions???
-
The amdtemp module supports AMD K8 microarchitecture or newer. The Athlon XP is K7.
To get the temperature of earlier CPUs you could try using mbmon. You will have to do some coding to make it work with this widget though.
Steve
-
Thanks! This is great and should be included in the default install IMO!!
Again, Thanks alot!
Cheers
E -
Hello,
I tried applying the patch that is located in the main post. I downloaded the package system patch and have tried it via command line with the same result. When I test the patch I get errors saying it cant be applied cleanly. Is this due to showp1984 stuff? should it be removed? not that experienced with troubleshooting patches..Output of full patch apply test:
/usr/bin/patch –directory=/ -t -p4 -i /var/patches/50be92a047646.patch --check --forward
Hmm... Looks like a unified diff to me...
The text leading up to this was:|diff -Naur /home/showp1984/Desktop/a/usr/local/www/includes/functions.inc.php /home/showp1984/Desktop/b/usr/local/www/includes/functions.inc.php
|--- /home/showp1984/Desktop/a/usr/local/www/includes/functions.inc.php 2012-08-07 01:01:33.902057913 +0200+++ /home/showp1984/Desktop/b/usr/local/www/includes/functions.inc.php 2012-08-06 06:13:12.000000000 +0200 No file to patch. Skipping... Hunk #1 ignored at 136. Hunk #2 ignored at 151. 2 out of 2 hunks ignored--saving rejects to a/usr/local/www/includes/functions.inc.php.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was:
|diff -Naur /home/showp1984/Desktop/a/usr/local/www/widgets/widgets/system_information.widget.php /home/showp1984/Desktop/b/usr/local/www/widgets/widgets/system_information.widget.php
|--- /home/showp1984/Desktop/a/usr/local/www/widgets/widgets/system_information.widget.php 2012-08-07 01:01:27.446742521 +0200+++ /home/showp1984/Desktop/b/usr/local/www/widgets/widgets/system_information.widget.php 2012-08-06 06:10:46.000000000 +0200 No file to patch. Skipping... Hunk #1 ignored at 232. 1 out of 1 hunks ignored--saving rejects to a/usr/local/www/widgets/widgets/system_information.widget.php.rej done -
I haven't actually tried this but looking at the patch file it's obviously been built against two files on the OPs desktop machine.
Since this is a relatively minor change to only two files I suggest you simply edit the two files manually.
Steve
-
Stephen,
I was able to do the manual edits prior to posting. I was just wondering why the patch wasn't working. It would have just saved me some time editing that's all. Thought maybe i was doing something wrong with the patch.btw thanks to the OP for working on this. I do appreciate it. Now if i could just get this info on LCDProc everything would be golden. :-D
-
For some reason i can't get coretemp to automatically load upon reboot. I can ssh over and run kldload coretemp and i am up and running. I did edit the loader.conf.local and added coretemp_load="yes". The module is in /boot/modules as well.
Am I missing something else to enable pfsense to load this on boot if i have to reboot the firewall?
-
File permissions perhaps?
Looks like you're doing everything correctly.Steve