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

HOWTO: Temperature Monitoring with coretemp in Sysinfo widget

Scheduled Pinned Locked Moved Hardware
38 Posts 16 Posters 18.9k 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 Sep 30, 2012, 12:19 AM

    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

    1 Reply Last reply Reply Quote 0
    • E
      esnakk
      last edited by Oct 2, 2012, 8:12 AM

      Thanks! This is great and should be included in the default install IMO!!

      Again, Thanks alot!

      Cheers
      E

      –
      Cheers,
      E

      1 Reply Last reply Reply Quote 0
      • K
        kilthro
        last edited by Dec 5, 2012, 12:16 AM

        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
        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Dec 5, 2012, 1:02 PM

          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

          1 Reply Last reply Reply Quote 0
          • K
            kilthro
            last edited by Dec 5, 2012, 4:51 PM

            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

            1 Reply Last reply Reply Quote 0
            • K
              kilthro
              last edited by Dec 15, 2012, 8:35 PM

              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?

              1 Reply Last reply Reply Quote 0
              • S
                stephenw10 Netgate Administrator
                last edited by Dec 16, 2012, 2:43 AM

                File permissions perhaps?
                Looks like you're doing everything correctly.

                Steve

                1 Reply Last reply Reply Quote 0
                • K
                  kilthro
                  last edited by Dec 16, 2012, 2:48 AM

                  @stephenw10:

                  File permissions perhaps?
                  Looks like you're doing everything correctly.

                  Steve

                  What would i be looking for in relation to file permission? is there a way to test (fake boot process) to see if it would give me an error and why it wouldnt load?

                  1 Reply Last reply Reply Quote 0
                  • K
                    kilthro
                    last edited by Dec 16, 2012, 2:51 AM

                    should i add the line to loader.conf? or would that be bad? Wasnt sure if the .local may not be utilized for some reason? just thinking out loud.

                    1 Reply Last reply Reply Quote 0
                    • W
                      wallabybob
                      last edited by Dec 16, 2012, 3:27 AM

                      @kilthro:

                      should i add the line to loader.conf? or would that be bad? Wasnt sure if the .local may not be utilized for some reason? just thinking out loud.

                      /boot/loader.conf may change on reinstall; /boot/loader.conf.local is guaranteed to remain untouched by a reinstall.

                      You might see an error report on coretemp during the early boot (before the kernel is started).

                      1 Reply Last reply Reply Quote 0
                      • G
                        Gluon99
                        last edited by Jan 21, 2013, 6:01 AM

                        Worked just fine on my Jetway MB with pfSense 2.0.2

                        coretemp.ko was already in /boot/kernel folder

                        Edited all files manually

                        – pfSense 2.0.2 Setup --
                        Motherboard: Jetway NF99FL-525
                        CPU: Intel Atom D525 Dual-Core 1.8GHz
                        RAM: 1x2GB Crucial DDR3 1333
                        HD: 60GB OCZ Agility 3 SATA III
                        PSU: PicoPSU-80
                        Case: M350 Universal Mini-ITX enclosure

                        1 Reply Last reply Reply Quote 0
                        • M
                          mattias197711
                          last edited by Feb 6, 2013, 6:50 PM

                          will this work for 2.1 to?

                          1 Reply Last reply Reply Quote 0
                          • K
                            kilthro
                            last edited by Feb 6, 2013, 7:55 PM

                            I have it working on most recent version. Just do the edits manually.

                            1 Reply Last reply Reply Quote 0
                            • D
                              DickB
                              last edited by Feb 6, 2013, 8:48 PM

                              I have it working on my Soekris 6501-50 with atom E6xx proc. and i386 pfSense 2.1.
                              It shows the temp for 2 cores (hyper threading).
                              I have manually edited both .php files
                              Works great.

                              1 Reply Last reply Reply Quote 0
                              • M
                                mattias197711
                                last edited by Feb 6, 2013, 9:17 PM

                                cool.

                                thx

                                1 Reply Last reply Reply Quote 0
                                • M
                                  mattias197711
                                  last edited by Feb 7, 2013, 10:14 AM

                                  Thanks again.

                                  did get som errrors at first i missed some stuff. and some rows didnt match.
                                  you had some line more then me. but wasnt any biggie.

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    robi
                                    last edited by Sep 9, 2013, 2:38 PM

                                    Works perfectly in release 2.0.3, which already has included coretemp modules! Only the PHP files need to be modified.

                                    I suggest to pull these in for everybody, by default in the installation media.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      stephenw10 Netgate Administrator
                                      last edited by Sep 9, 2013, 3:29 PM

                                      The coretemp modules and a dashboard temperature reading is included by default in 2.1. I don't think it is graphed though.

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        robi
                                        last edited by Sep 9, 2013, 4:22 PM

                                        OK thanks, didn't know that, I'm just upgrading to 2.0.3…

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          robi
                                          last edited by Sep 9, 2013, 4:24 PM

                                          If anyone wants to graph these temperatures in Munin, using the munin-node on pfSense based on this, here's a plugin for that:

                                          #!/bin/sh
                                          
                                          # Plugin to monitor Jetway motherboard CPU temperatures on pfSense controller runtime data. Installation:
                                          # - copy this plugin script to /usr/local/share/munin/plugins/, make it executable
                                          # - symlink it to /usr/local/etc/munin/plugins/
                                          # - restart munin-service
                                          
                                          case $1 in
                                             config)
                                                  cat <<'EOM'
                                          graph_title CPU Temperatures
                                          graph_vlabel Degrees C
                                          graph_category sensors
                                          cpu_0.label Core 0
                                          cpu_1.label Core 1
                                          cpu_2.label Core 2
                                          cpu_3.label Core 3
                                          
                                          EOM
                                                  exit 0;;
                                          esac
                                          
                                          temp0=$(/sbin/sysctl dev.cpu.0.temperature|awk '{print $2}')
                                          echo -n 'cpu_0.value '; echo $temp0|awk '{gsub(/C/,"")};{print}'
                                          temp1=$(/sbin/sysctl dev.cpu.1.temperature|awk '{print $2}')
                                          echo -n 'cpu_1.value '; echo $temp1|awk '{gsub(/C/,"")};{print}'
                                          temp2=$(/sbin/sysctl dev.cpu.2.temperature|awk '{print $2}')
                                          echo -n 'cpu_2.value '; echo $temp2|awk '{gsub(/C/,"")};{print}'
                                          temp3=$(/sbin/sysctl dev.cpu.3.temperature|awk '{print $2}')
                                          echo -n 'cpu_3.value '; echo $temp3|awk '{gsub(/C/,"")};{print}'
                                          
                                          

                                          Btw, munin-node works fine on 2.0.3 too.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]