• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to: Get CPU temp

Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
140 Posts 24 Posters 115.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stephenw10 Netgate Administrator
    last edited by Aug 5, 2011, 12:14 AM Aug 5, 2011, 12:04 AM

    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

    1 Reply Last reply Reply Quote 0
    • A
      asterix
      last edited by Aug 5, 2011, 2:22 AM Aug 5, 2011, 12:45 AM

      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.

      1 Reply Last reply Reply Quote 0
      • G
        GoldServe
        last edited by Aug 5, 2011, 4:22 AM

        My N270 is 52-55C in a totally passively cooled solution (Lanner netapp).

        1 Reply Last reply Reply Quote 0
        • R
          RedRep
          last edited by Aug 5, 2011, 4:57 AM

          http://encodable.com/uploaddemo/files/pfsense/coretemp.ko-amd64
          AMD64 version

          1 Reply Last reply Reply Quote 0
          • A
            asterix
            last edited by Aug 5, 2011, 5:40 AM

            Thank you !!

            1 Reply Last reply Reply Quote 0
            • A
              asterix
              last edited by Aug 5, 2011, 6:11 AM

              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.0C

              Added 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?

              1 Reply Last reply Reply Quote 0
              • C
                Cino
                last edited by Aug 5, 2011, 1:46 PM

                @stephenw10:

                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

                1 Reply Last reply Reply Quote 0
                • M
                  Micro
                  last edited by Aug 5, 2011, 8:22 PM

                  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.

                  The biggest security issue is …. you !!!

                  HW : Watchguard Firebox x700
                  CPU : Intel Celeron 1.2GHz
                  RAM : 256MB

                  1 Reply Last reply Reply Quote 0
                  • A
                    AhnHEL
                    last edited by Aug 5, 2011, 10:27 PM Aug 5, 2011, 10:02 PM

                    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.

                    AhnHEL (Angel)

                    1 Reply Last reply Reply Quote 0
                    • T
                      Tikimotel
                      last edited by Aug 5, 2011, 10:03 PM

                      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!

                      1 Reply Last reply Reply Quote 0
                      • B
                        breese
                        last edited by Aug 5, 2011, 10:36 PM

                        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>

                        1 Reply Last reply Reply Quote 0
                        • P
                          ptt Rebel Alliance
                          last edited by Aug 5, 2011, 11:42 PM Aug 5, 2011, 11:39 PM

                          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 )

                          coretemp.ko.txt
                          amdtemp.ko.txt

                          1 Reply Last reply Reply Quote 0
                          • ?
                            Guest
                            last edited by Aug 6, 2011, 12:11 AM

                            I would love to see this officially added  to pfsense.
                            However, what about multi core cpus?

                            1 Reply Last reply Reply Quote 0
                            • A
                              adrianhensler
                              last edited by Aug 6, 2011, 12:25 AM

                              Thanks for a fun thread.

                              My AMD Geode is 44 C just in case anyone is interested.  A jetway board in a matx case.

                              1 Reply Last reply Reply Quote 0
                              • A
                                asterix
                                last edited by Aug 6, 2011, 1:40 AM Aug 6, 2011, 1:10 AM

                                Superb work guys !!

                                Now 2 things added to this will make it even more kewl !! :D

                                1. Add a degree (°) before the C
                                2. Show all cores temp on the dash
                                1 Reply Last reply Reply Quote 0
                                • R
                                  RedRep
                                  last edited by Aug 6, 2011, 2:32 AM Aug 6, 2011, 2:24 AM

                                  @asterix:

                                  Superb work guys !!

                                  Now 2 things added to this will make it even more kewl !! :D

                                  1. Add a degree (°) before the C
                                  2. 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. :)

                                  @breese:

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    Cino
                                    last edited by Aug 6, 2011, 2:32 AM

                                    @RedRep Nice work!

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      asterix
                                      last edited by Aug 6, 2011, 3:43 AM Aug 6, 2011, 3:37 AM

                                      @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..

                                      1. auto check if mobo supports temp monitor
                                      2. 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
                                      3. If not.. hide the Temperature field from the dash.
                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        seh2000
                                        last edited by Aug 6, 2011, 8:03 PM Aug 6, 2011, 7:21 PM

                                        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 2011

                                        I 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)

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          RedRep
                                          last edited by Aug 6, 2011, 7:33 PM

                                          Does anyone else have this issue?  Someone mind hosting two 8kb kernel extensions?

                                          1 Reply Last reply Reply Quote 0
                                          23 out of 140
                                          • First post
                                            23/140
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received