Temperature Widget
-
-
If motherboard manufacturers bothered to code their ACPI tables correctly there wouldn't be a problem! >:(
Steve
Edit: response to a post that vanished. ::)
-
…repost...
Hehe, im running on virtualized hardware, so i need to ask my bank to buy a new system which supports the processor specific module ;))
Anyway, both will be supported bythe widget -
Steve, are you referring to the FireBox X500?
Recently my FB X500 fan/blower died and I had to open my X500, put a cpu fan in place of the blower and leave the cover off while I wait for new replacements I ordered off of eBay (from HK of course…) and was wondering if there was a way of enabling such widget for a Celeron 1200Mhz
-
Nope I was talking about the XTM5.
You can use the output of mbmon to drive the dashboard widget. We had a long thread up on this for 2.0.X, I'm sure a lot of it would be relevent here.
http://forum.pfsense.org/index.php/topic,39595.0.htmlAnd here was my specific post:
http://forum.pfsense.org/index.php/topic,39595.msg204643.html#msg204643Steve
-
ah, informative - ill read that in a minute.
decided to just post what i got till now:
The code defaults to dev.cpu0 [as is] but is able to handle multiple acpi temperatures too if that module is used instead.function get_temp() { // queries thermal sensors via sysctl. // returns array of sensors and their corresponding values $arr_parsed =""; $arr_temp = array(); $filter_acpi = "tz[0-1].temperature"; // escaping for possible inclusion in config.xml $oid_cpu = escapeshellcmd("dev.cpu0.temperature"); $oid_acpi = escapeshellcmd("hw.acpi.thermal"); // First, query for a processor specific sensor on the die exec("/sbin/sysctl '". $oid_cpu ."' | grep -E 'cpu.*temperature'" , $arr_cpu); // exec ("cat /root/temp_cpu | grep -E 'cpu.0.temperature'" , $arr_cpu); if (arr_cpu != "") { $arr_temp = array_merge($arr_temp,$arr_cpu); } // Alternative: query all acpi thermal zones. exec ("sysctl ". $oid_temp ." | grep -E '". $filter_acpi ."'" , $arr_acpi); // exec ("cat /root/temp_acpi | grep -E '".$filter_acpi."'" , $arr_acpi); if (arr_acpi != "") { $arr_temp = array_merge($arr_temp,$arr_acpi); } foreach (($arr_temp) as $value) { preg_match("/tz[0-9]|cpu/i", $value, $sens_id); // get sensor id preg_match("/[0-9]{1,2}.[0-9]/", $value, $sens_val); // get temperature value $arr_parsed[] = array ($sens_id, $sens_val); } return($arr_parsed); }
is nearly finished now but well see. Anyway, its main purpose is to train me some pfSense gui customisation skills, so no problem for me.
Heres what its look like by now:
-
So where do we get the coretemp.ko that's compatible with pfSense 2.1 short of building a BSD 8.3 kernel?
Is this going to end up in the regular distribution at some point or will this remain in the everyone interested hacks it in on their own territory? -
Oh, its written Source independent (see discussion above) to let the users choose what they want to use.
Edit:
Im currently banned from the highspeed World and have to use gprs till eoM. (:grm:)
ill sync wt current git and do the commit as soon as my highpriced provider is able to…till then here are the other changed functions:
function updateTemp(obj_json) { /* modify the red / grey bar gifs according to the temperature ratio is one pixel per degree. */ jQuery.map(obj_json,function(value,index){ tempmeter = "#tempmeter" + value tempwidtha = "#tempwidtha" + value tempwidthb = "#tempwidthb" + value console.log(tempmeter); jQuery(tempwidthb).css('width',(100 - value[1]) + 'px'); if(jQuery(tempmeter)) jQuery(tempmeter).html(value[1] + '\u00B0' + 'C'); if(jQuery(tempwidtha)) jQuery(tempwidtha).css('width',value[1] + 'px'); if(jQuery(tempwidthb)) jQuery(tempwidthb).css('width',(100 - value[1]) + 'px'); });
and in system_information.widget.php
Temperature ![left bar](./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif)![red bar](./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif)![gray bar](./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif)![right bar](./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif)
-
I don't have 2.1 running on anything right now so I can't check but is it not included in the image? If not it just needs copying from a FreeBSD 8.3 install.
Steve
-
Any chance of an option for Deg F ? Large numbers of people just never grokked the metric system sadly. :-\
-
Hi, when the code gets accepted in main, then it will be in the image.
sorry, for the first run it will stay with degree ;(But this patch is just the first of two. A further one, which i plan to be more dynamic and more configurable in the gui will follow.
By now we have migration phase, where the view is generated by a mix of php and js output)
In that second patch i plan to seperate them and use php only for the backend and js for thecomplete system_information.widget
Edit - no lets keep it easy, just for the temps :)But for now - Ill note down a todo for an Option to switch output between Fahrenheit / Degrees ;)
If you need it faster, you can add code to check for the timezone after the patch has been accepted.
hanD !
-
Is there any chance to convert this into a package that also installs the coretemp.ko and loads it, because without this won't work on my system, and it being a fanless design, I'd love to know if things go badly in terms of temperature for some reason…
-
Nope I was talking about the XTM5.
You can use the output of mbmon to drive the dashboard widget. We had a long thread up on this for 2.0.X, I'm sure a lot of it would be relevent here.
http://forum.pfsense.org/index.php/topic,39595.0.htmlAnd here was my specific post:
http://forum.pfsense.org/index.php/topic,39595.msg204643.html#msg204643Steve
Thanks! :) I "pkg_add -r mbmon" and at least I can run it in command line. So I have 3 different "temps" when I run mbmon…
Temp.= 47.0, 127.0, 79,0; Rot.= 0, 0, 0
Vcore = 1.49, 3.38; Volt. = 3.31, 4.95, 11.67, -3.06, -6.12If -T3 is the CPU and that's in celcius I think I'm frying my CPU ATM!! But it's been running forever like this...?
EDIT 1:
Ok, T1 is my CPU temp, it went down to 46.0 when I put another fan to help the one I have temporarily. BTW I modified my functions.inc.php and I now have Temp in my GUI :D Thanks again Steve!EDIT 2:
I changed the -I to -i to show integer (no .0 at the end) -
mbmon doesn't seem to work here
So I guess I'd need coretemp. Where can we get the required files for that (amd64/BSD 8.3)? -
If -T3 is the CPU and that's in celcius I think I'm frying my CPU ATM!! But it's been running forever like this…?
Even if it was 79, that's fine for most modern CPU's. My MacBook Pro runs about 50-60 in normal use and keeps the fan running about 2000 RPM, but doesn't start ramping up the fan speed until just under 80. Under load, it throttles the fan speed up and down to keep the CPU in the 80-90 range.
-
Depends on if its fahrenheit or celsius too, hehe.
I see that mbmon is getting much attention and currently we support coretemp and acpi.
The code generates a source indepent temperature array, so its possible to add mbmon to.
I will add it as a source. Its not much effort and then everyone is able to to query with his favorite toy in the BE ;)–-
Maybe ill decide do a package too in the future, when i build up enough knowledge to do so, but lets keep the balls down for the moment :)
After all atm its just a neat patch which adds some sensors.Steven posted a link to the coretemp modules here: http://files.pfsense.org/jimp/ko-8.1/amd64/coretemp.ko
-
@ThorstenK:
Depends on if its fahrenheit or celsius too, hehe.
AFAIK, every single CPU on the market reads temperature in Celsius.
-
Yes, so im pretty sure that it wont be a good idea to modify the temp widgets code to print them in Fahrenheit or use that as a default. (see discussion above)
daplumpler: other People may get confused in the beginnings. I dont think we want this happening in such a critical area. -
Here is the coretemp module from my FreeBSD install.
It's an i386 (32bit) module from FreeBSD 8.3 rel. As before:Copy coretemp.ko into /boot/modules
Add```
coretemp_load="YES"I don't have a 64bit install at the moment unfortunately.
Remove the .png extension.
Steve
-
@ThorstenK:
Depends on if its fahrenheit or celsius too, hehe.
I see that mbmon is getting much attention and currently we support coretemp and acpi.
The code generates a source indepent temperature array, so its possible to add mbmon to.
I will add it as a source. Its not much effort and then everyone is able to to query with his favorite toy in the BE ;)–-
Maybe ill decide do a package too in the future, when i build up enough knowledge to do so, but lets keep the balls down for the moment :)
After all atm its just a neat patch which adds some sensors.Steven posted a link to the coretemp modules here: http://files.pfsense.org/jimp/ko-8.1/amd64/coretemp.ko
From what I understand, my T1 is my CPU temp and my T3 is my chipset temp. I am guessing if it's 127.0 (always at that) that temp is not available. You can program it to check if it's 127.0 to NOT display it in the GUI… If they are interested in knowing all the temps and not just the CPU temp..
BTW I confirmed with my buddy's FB X500 with good fan that he is running T1=45C , T2=127C and T3=77C (~2C less, so I am good)
-
mmh. I dont think that we really want that. Maybe 127 is 1111111 and so some kind of magic value.
and "normally" such a high temperature isnt realistic to be ever shown.Automatically deactivating a sensor just for convinience isnt a good idea in general.
It is better to implement a configuration screen (see notes about planned pach 2) which lets the user the decision to select the sensors on a per system base.Ill push the implementation to patch 2.
-
@ThorstenK:
Steven posted a link to the coretemp modules here: http://files.pfsense.org/jimp/ko-8.1/amd64/coretemp.ko
Yep, but that's for BSD 8.1, but we're running 8.3, AFAIK that's not compatible.
-
Thats right - Please check the last post of Steven. He posted the mod as attachment.
-
@ThorstenK:
Thats right - Please check the last post of Steven. He posted the mod as attachment.
Maybe I'm dense, or you're talking about a different Steven than I think you're talking about, but all I can find is a 32-bit version for 8.3, which won't work because I'm running a 64-bit install, and a 64-bit version for 8.1, which won't work because I'm on 8.3
-
This is right; StevenW10 runs on 32 bit. So when your runnig a 64 bit system it might be best to create a custom kernel or to fetch the bins from a 64bit freeBSD8.3 install or use a 32bit system if everything else fails.
Hm- Idea: Its good when skilled people solve problems - When your done you maybe decide to extend the pfsense Installer to check for the availability of the kmod. This way this problem will be solved for the future :)
Edit: Sorry stephenW10 for misspelling. -
It just requires one of you guys to download the 64bit FreeBSD 8.3 iso and extract the module from it. I'll do it tonight when it doesn't count towards my bandwidth cap if no one's done it by then.
Steve
-
Hi - since im on gprs right now, i cant do it till eom ;( so maybe you want to try:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/8.3/
hanD!
-
@ThorstenK:
mmh. I dont think that we really want that. Maybe 127 is 1111111 and so some kind of magic value.
and "normally" such a high temperature isnt realistic to be ever shown.Automatically deactivating a sensor just for convinience isnt a good idea in general.
It is better to implement a configuration screen (see notes about planned pach 2) which lets the user the decision to select the sensors on a per system base.Ill push the implementation to patch 2.
Yeah, that's definitely a better approach. Let the user pick. If you can't have user interaction then filtering the 127 would work I think.
-
mmh. it may take a week for patch two i think.
I wouldnt like it very much, but meanwhile -
What about for a config tunable, which we set for filtering out sensors with 127 degrees ?
This would be fast to implement and seems like a good compromise, what do you think ? -
@ThorstenK:
mmh. it may take a week for patch two i think.
I wouldnt like it very much, but meanwhile -
What about for a config tunable, which we set for filtering out sensors with 127 degrees ?
This would be fast to implement and seems like a good compromise, what do you think ?I agree, I mean, if it's there (and working) why not use it? We need to add mbmon also. I have the 32-bit version, I think the 64-bit CPUs prob. already have working coretemp32 or coretemp64?
-
From what i know its already available, but we have to check that. I switched machines and had to reinst Windows because of anno2070 wasnt working under wine. This has changed meanwhile 8))) So as soon as i have hsdpa again (eoMonth)- ill switch back to linux and FreeBSD :) and write the extension to include mbmon first with the tunable above.
-
OK, finally got the coretemp.ko installed, etc. and now have a temperature reading of a cool 35C
Was a little bit involved, because OS X doesn't grok BSD's file system, so I ended up doing a memory stick, mounting it on the pfSense box, and then copied it with an slogin over to where it needs to go.
The config file I ended up editing with the Web GUI, because I couldn't remember the name of the non-vi editor installed on pfSense, it's not nano or pico, and of course not emacs (which I usually would use)
Why the heck keep I forgetting the name? ???Anyway, things are working. Now it's going to be interesting to see what get's stomped over with the next upgrade that I'm just running….
-
It's ee (easy editor) ;)
-
OK, finally got the coretemp.ko installed, etc. and now have a temperature reading of a cool 35C
wish mine was at 35c, 60c right now :-(
-
Here's the 64bit coretemp.ko from FreeBSD 8.3 for anyone else.
Remove the .png extension.Steve
-
Temperature widget is not available (or not supported) on our nano bsd alix boards..
:( -
Temperature widget is not available (or not supported) on our nano bsd alix boards..
:(What kind of CPUs do these have? If the CPU doesn't have built-in sensors (like e.g. the intel Core CPUs or the intel Atom CPUs), or the motherboard doesn't have a temperature sensor that's somehow published (e.g. ACPI), then it's got to be a no-go.
-
Temperature widget is not available (or not supported) on our nano bsd alix boards..
:(What kind of CPUs do these have? If the CPU doesn't have built-in sensors (like e.g. the intel Core CPUs or the intel Atom CPUs), or the motherboard doesn't have a temperature sensor that's somehow published (e.g. ACPI), then it's got to be a no-go.
Mine (PC Engines thing) shows this in dmesg:
CPU: Geode(TM) Integrated Processor by AMD PCS (498.05-MHz 586-class CPU)
Origin = "AuthenticAMD" Id = 0x5a2 Family = 5 Model = a Stepping = 2
Features=0x88a93d <fpu,de,pse,tsc,msr,cx8,sep,pge,cmov,clflush,mmx>AMD Features=0xc0400000 <mmx+,3dnow!+,3dnow!>… and this further down which probably doesn't help:ACPI Error: A valid RSDP was not found (20101013/tbxfroot-309)
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.Cheers
Jon</mmx+,3dnow!+,3dnow!></fpu,de,pse,tsc,msr,cx8,sep,pge,cmov,clflush,mmx> -
Not sure if the GEODE chips have built-in temp sensors but if so, you'd likely have to install the amdtemp.ko module analog to us intel guys having to install the coretemp.ko module.
http://www.freebsd.org/cgi/man.cgi?query=amdtemp&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
-
OK, finally got the coretemp.ko installed, etc. and now have a temperature reading of a cool 35C
Was a little bit involved, because OS X doesn't grok BSD's file system, so I ended up doing a memory stick, mounting it on the pfSense box, and then copied it with an slogin over to where it needs to go.
The config file I ended up editing with the Web GUI, because I couldn't remember the name of the non-vi editor installed on pfSense, it's not nano or pico, and of course not emacs (which I usually would use)
Why the heck keep I forgetting the name? ???Anyway, things are working. Now it's going to be interesting to see what get's stomped over with the next upgrade that I'm just running….
I enabled SSH on pfSense and I connect from both Win7 and OS X. What I do on OS X is open a terminal shell and type "ssh 192.168.0.1 -l admin" it will then ask me for a password. On Win7 I use putty. After that when I get to the menu on pfSense I select option 8, and on pfSense's shell I ftp to my machine and transfer files that way. I also use nano "pkg_add -r nano"