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

    Possible to get Intel PCH/Chipset temperature to Thermal Sensor Widget?

    General pfSense Questions
    2
    21
    1.9k
    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.
    • M
      mvikman
      last edited by mvikman

      There seems to be support on FreeBSD now to also get temperature info for Intel PCH/Chipset with sysctl from dev.pchtherm

      https://man.freebsd.org/cgi/man.cgi?query=pchtherm&apropos=0&sektion=0&manpath=FreeBSD+13.0-current&arch=default&format=html

      Would it be possible to add this temperature info to the Thermal Sensor Widget?

      pfSense Plus 24.11-RELEASE (amd64)
      Dell Optiplex 7040 SFF
      Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
      HPE 561T (X540-AT2), 2-port 10Gb RJ45
      HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

        Do you see the sysctl populated if you load the kernel module?

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

          Here's the sysctl output, I assume this is what you mean?

          [23.01-RELEASE][admin@shodan.phobos.home.arpa]/root: sysctl dev.pchtherm
          dev.pchtherm.0.ctt: 115.0C
          dev.pchtherm.0.temperature: 53.0C
          dev.pchtherm.0.t2temp: 114.0C
          dev.pchtherm.0.t1temp: 111.0C
          dev.pchtherm.0.t0temp: 108.0C
          dev.pchtherm.0.pmtime: 32
          dev.pchtherm.0.pmtemp: 50.0C
          dev.pchtherm.0.%parent: pci0
          dev.pchtherm.0.%pnpinfo: vendor=0x8086 device=0xa131 subvendor=0x1028 subdevice=0x06b9 class=0x118000
          dev.pchtherm.0.%location: slot=20 function=2 dbsf=pci0:0:20:2
          dev.pchtherm.0.%driver: pchtherm
          dev.pchtherm.0.%desc: Skylake PCH 100 Thermal Subsystem
          dev.pchtherm.%parent:
          

          pfSense Plus 24.11-RELEASE (amd64)
          Dell Optiplex 7040 SFF
          Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
          HPE 561T (X540-AT2), 2-port 10Gb RJ45
          HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

            Yes, exactly that. It looks like it only attaches to 6th gen or newer chipsets? I was testing some other devices but I see it now.
            Should be trivial to add, let me look....

            1 Reply Last reply Reply Quote 2
            • M
              mvikman
              last edited by mvikman

              Not sure about the chipset gen, but based on google results, I would guess that the PCH temp sensors started to show up in/after Haswell-era chipsets. Though I don't know which chipsets the pchtherm driver can read.

              pfSense Plus 24.11-RELEASE (amd64)
              Dell Optiplex 7040 SFF
              Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
              HPE 561T (X540-AT2), 2-port 10Gb RJ45
              HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                Mmm, I was testing with Haswell initially and it didn't work for me. Works on a Skylake box though. It looks like Haswell should work:
                https://github.com/pfsense/FreeBSD-src/blob/devel-main/sys/dev/intel/pchtherm.c#L86

                https://redmine.pfsense.org/issues/14255

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

                  Added a patch there you can test.

                  You'll need to reset the RRD data to see the new pchtherm value graphed.

                  Let me know if you see any issues.

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mvikman @stephenw10
                    last edited by mvikman

                    Widget seems to be working, didn't reset RRD data yet.
                    Could add warning and critical limits also for PCH in the widget :)

                    EDIT: Reset the RRD data, graphs also seem to work.

                    pfSense Plus 24.11-RELEASE (amd64)
                    Dell Optiplex 7040 SFF
                    Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                    HPE 561T (X540-AT2), 2-port 10Gb RJ45
                    HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                      Adding the limits could be done but it's significantly more complex. Could be added later though.

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

                        I dabbled a bit with the files and I think I managed to add the limits for PCH temps.
                        Can you possibly review/check my changes?

                        pfSense Plus 24.11-RELEASE (amd64)
                        Dell Optiplex 7040 SFF
                        Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                        HPE 561T (X540-AT2), 2-port 10Gb RJ45
                        HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                          Sure. The best way is to make a pull request in github if you can.

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

                            I have never used github and have no idea how to do a pull request...

                            pfSense Plus 24.11-RELEASE (amd64)
                            Dell Optiplex 7040 SFF
                            Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                            HPE 561T (X540-AT2), 2-port 10Gb RJ45
                            HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                              Ok, no worries, you have a patch? Or some other list of your changes? Or just the file we can diff against?

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

                                I have the modified php and js files

                                pfSense Plus 24.11-RELEASE (amd64)
                                Dell Optiplex 7040 SFF
                                Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                                HPE 561T (X540-AT2), 2-port 10Gb RJ45
                                HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                                  Upload them here: https://nc.netgate.com/nextcloud/index.php/s/qoK6XmdA2ffAiRH

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

                                    Files uploaded

                                    pfSense Plus 24.11-RELEASE (amd64)
                                    Dell Optiplex 7040 SFF
                                    Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                                    HPE 561T (X540-AT2), 2-port 10Gb RJ45
                                    HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                                      Ok I reworked the formatting slightly and added it as a diff:
                                      https://redmine.pfsense.org/issues/14255#note-4

                                      Please test that if you can. Looks good here though.

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

                                        Restored original files and applied your diffs, seems to be working.
                                        Formatting rework was mostly spaces to tabs?

                                        Though js-file seems to have extra tabs at the end of lines 85 and 141 (criticalTemp = tsParams.pchCriticalTempThreshold;)

                                        Might not really be relevant, but in the widget settings, the treshold range is "hardcoded" in the text and not using variables MIN/MAX_THRESHOLD_VALUE, so if you change those values, the change isn't reflected in the description text.

                                        Also the pchtherm driver basically already provides the warning (t0temp) and critical (t2temp) limits, but that goes beyond my coding knowledge 😄

                                        pfSense Plus 24.11-RELEASE (amd64)
                                        Dell Optiplex 7040 SFF
                                        Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                                        HPE 561T (X540-AT2), 2-port 10Gb RJ45
                                        HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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

                                          Yup, you're right. Not sure how those crept in. I'll remove them.

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            mvikman @stephenw10
                                            last edited by

                                            @stephenw10

                                            Just went through the code once more and noticed the there are lines with "pulsate" in the variable names (like "thermal_sensors_widget_pulsate_warning").
                                            The variable values are saved in the settings, but there seem to have no function that use them and the widget doesn't have checkbox to set this value.

                                            Are those line part of a code for a function/feature that was left unfinished or discarded in the widget final version?

                                            pfSense Plus 24.11-RELEASE (amd64)
                                            Dell Optiplex 7040 SFF
                                            Core i5-6500, 8GB RAM, 2x 240GB SSD (ZFS Mirror)
                                            HPE 561T (X540-AT2), 2-port 10Gb RJ45
                                            HPE 562SFP+ (X710-DA2), 2-port 10Gb SFP+

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