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.6k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      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

        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

          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
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

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

            Steve

            1 Reply Last reply Reply Quote 0
            • K
              kilthro
              last edited by

              @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

                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

                  @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

                    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

                      will this work for 2.1 to?

                      1 Reply Last reply Reply Quote 0
                      • K
                        kilthro
                        last edited by

                        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

                          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

                            cool.

                            thx

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

                              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

                                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
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  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

                                    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

                                      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
                                      • R
                                        robi
                                        last edited by

                                        Munin Plugin updated for 8-core cpu temperature (tested on Supermicro A1SRi-2758F):

                                        #!/bin/sh
                                        
                                        # - 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
                                        cpu_4.label Core 4
                                        cpu_5.label Core 5
                                        cpu_6.label Core 6
                                        cpu_7.label Core 7
                                        
                                        EOM
                                        exit 0;;
                                        esac
                                        
                                        temps=$(/sbin/sysctl dev.cpu | grep temperature)
                                        echo -n 'cpu_0.value '; printf "$temps" | awk 'NR==1{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_1.value '; printf "$temps" | awk 'NR==2{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_2.value '; printf "$temps" | awk 'NR==3{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_3.value '; printf "$temps" | awk 'NR==4{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_4.value '; printf "$temps" | awk 'NR==5{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_5.value '; printf "$temps" | awk 'NR==6{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_6.value '; printf "$temps" | awk 'NR==7{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        echo -n 'cpu_7.value '; printf "$temps" | awk 'NR==8{print $2; exit}' | awk '{gsub(/C/,"")};{print}'
                                        

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