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
      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
                    • M
                      Micro
                      last edited by

                      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.

                      The biggest security issue is …. you !!!

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

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

                        @Micro:

                        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.

                        Try with the core temp file Steve posted here - I used that one and it worked.
                        Steen

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

                          If you are using SCP to transfer the file.. ensure that you transfer the file in binary format. I had similar issue with WinSCP.

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

                            @Micro:

                            My pfsense box is a Watchguard Firebox X700 hardware which runs on Intel Celeron 1200MHz.
                            This CPU should be supported by coretemp no ?

                            The coretemp driver only supports Intel Core cpus and newer.  ;)

                            You have to use mbmon for older hardware such as the X700, which is Pentium 3 age.

                            Steve

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

                              Awesome …

                              I have to try this on my own box

                              thanks

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

                                @asterix:

                                If you are using SCP to transfer the file.. ensure that you transfer the file in binary format. I had similar issue with WinSCP.

                                With the file from Steve I had no issue even when using WinSCP…
                                Steen

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

                                  Anyone had success to get all 4 temperatures to be shown in the dashboard?
                                  That would really be neat.
                                  Also, will an snapshot update break everything?

                                  Steen

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

                                    A snapshot would require you to re-edit the function file, other than that it will be fine.

                                    Displaying multiple cores will take a little work.  I've only programmed in Java before and I haven't really had time to sit down and take a look as far as exactly what needs to be added functionality wise.  Right now, the function file returns true/false as far as if you can get temp and the cpu temp itself.  It would need to return the number of cores and the temperatures of each core.

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

                                      @RedRep:

                                      A snapshot would require you to re-edit the function file, other than that it will be fine.

                                      Displaying multiple cores will take a little work.  I've only programmed in Java before and I haven't really had time to sit down and take a look as far as exactly what needs to be added functionality wise.  Right now, the function file returns true/false as far as if you can get temp and the cpu temp itself.  It would need to return the number of cores and the temperatures of each core.

                                      Yep, just did the latest snapshot update, so back to the editing board :)
                                      Cheers Steen
                                      Update:
                                      After the snapshot update I had to recopy the coretemp.ko file to /boot/kernel/, then edit the system_information_widget.php file and edit the functions.inc.php file then I was back to "normal".

                                      Cheers Steen

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        Micro
                                        last edited by

                                        @stephenw10:

                                        @Micro:

                                        My pfsense box is a Watchguard Firebox X700 hardware which runs on Intel Celeron 1200MHz.
                                        This CPU should be supported by coretemp no ?

                                        The coretemp driver only supports Intel Core cpus and newer.  ;)

                                        You have to use mbmon for only hardware such as the X700, which is Pentium 3 age.

                                        Steve

                                        Thanks for the info Steve !!!

                                        Now I have installed the mbmon package and I'm able to get system informations like FAN RPM, CPU and chipset temp from shell.
                                        I've modified the Get_Temp function code in the system_information.widget.php as follow :

                                        
                                        function get_temp() {
                                        $temp_out = "";
                                        exec("mbmon -c1 | /usr/bin/awk '{ print $2 }' | /usr/bin/cut -d ',' -f 1", $dfout);
                                        $temp_out = trim($dfout[0]);
                                        
                                        return $temp_out;
                                        
                                        ```}
                                        
                                        This works fine in the shell.
                                        
                                        I created the file /boot/loader.conf.local with "coretemp_load="yes"" inside (even if I'm not really sure that in my case it will be useful).
                                        
                                        At this time, the "system information" widget in the dashboard of pfsense doesn't show the cpu temp.
                                        Is there anything else to do when using mbmon instead of coretemp to make temperature info working ?
                                        
                                        Thanks for your support.
                                        
                                        Micro.

                                        The biggest security issue is …. you !!!

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

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

                                          I phrased that badly.
                                          I've only ever used mbmon from the command line.
                                          It would be nice to have it work with the GUI though.

                                          Steve

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            Micro
                                            last edited by

                                            Oups,
                                            I mean I modified the code in the function.inc.php file, not in system_information.widget.php

                                            Micro.

                                            The biggest security issue is …. you !!!

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

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