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.
    • B
      breese
      last edited by

      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
      • pttP
        ptt Rebel Alliance
        last edited by

        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

          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

            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

              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

                @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

                  @RedRep Nice work!

                  1 Reply Last reply Reply Quote 0
                  • A
                    asterix
                    last edited by

                    @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

                      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

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

                        1 Reply Last reply Reply Quote 0
                        • pttP
                          ptt Rebel Alliance
                          last edited by

                          You can try from here: http://ptt.4mg.com/pfSense/

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            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

                            1 Reply Last reply Reply Quote 0
                            • S
                              seh2000
                              last edited by

                              @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

                              1 Reply Last reply Reply Quote 0
                              • S
                                seh2000
                                last edited by

                                @stephenw10:

                                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

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Here is the coretemp.ko file from FreeBSD 8.1 release (386).
                                  Remove the .png extension. The file should be 8054 bytes.

                                  Steve

                                  coretemp.ko.png

                                  1 Reply Last reply Reply Quote 0
                                  • pttP
                                    ptt Rebel Alliance
                                    last edited by

                                    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 )

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      seh2000
                                      last edited by

                                      @stephenw10:

                                      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

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        seh2000
                                        last edited by

                                        @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

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          seh2000
                                          last edited by

                                          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)

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            RedRep
                                            last edited by

                                            @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 :)

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.