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

Is there a command to view current cpu clock speed?

Scheduled Pinned Locked Moved General pfSense Questions
15 Posts 4 Posters 4.8k 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.
  • P
    pfsensenoobie
    last edited by pfsensenoobie Aug 21, 2019, 4:38 AM Aug 21, 2019, 4:37 AM

    I have a cpu that can turbo boost but I wanted to see if there was a way to view the current cpu clock speed?

    Kinda like the task manager in windows where you see current clocks but on pfsense. Is it a special command/package i need?

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by KOM Aug 21, 2019, 2:11 PM Aug 21, 2019, 2:10 PM

      top

      1 Reply Last reply Reply Quote 1
      • S
        stephenw10 Netgate Administrator
        last edited by stephenw10 Aug 21, 2019, 2:15 PM Aug 21, 2019, 2:13 PM

        [2.5.0-DEVELOPMENT][root@xtm800.stevew.lan]/root: sysctl dev.cpu.0.freq
        dev.cpu.0.freq: 3201
        

        Note that is indicating 3.2GHz with Turbo. The extra 1 shows turbo is enabled.

        The dashboard will also show it at anything less than maximum speed:
        Selection_680.png

        Steve

        B 1 Reply Last reply Feb 10, 2022, 3:41 PM Reply Quote 1
        • P
          pfsensenoobie
          last edited by Aug 21, 2019, 4:26 PM

          Thanks guys!!

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Aug 21, 2019, 4:27 PM

            Also you must enable powerd in Sys > Adv > Misc to see variable clock speed.

            Steve

            P 1 Reply Last reply Aug 21, 2019, 4:41 PM Reply Quote 0
            • P
              pfsensenoobie @stephenw10
              last edited by Aug 21, 2019, 4:41 PM

              @stephenw10 yea i have it on max performance

              1 Reply Last reply Reply Quote 0
              • B
                bigjohns97 @stephenw10
                last edited by Feb 10, 2022, 3:41 PM

                @stephenw10 said in Is there a command to view current cpu clock speed?:

                [2.5.0-DEVELOPMENT][root@xtm800.stevew.lan]/root: sysctl dev.cpu.0.freq
                dev.cpu.0.freq: 3201
                

                Note that is indicating 3.2GHz with Turbo. The extra 1 shows turbo is enabled.

                The dashboard will also show it at anything less than maximum speed:
                Selection_680.png

                Steve

                @stephenw10 sorry to bump such an old thread but I was wondering if you knew if this meant that the CPU was actually scaling past the 3200 MHz in this example and we just didn't have the visibility to it from withing pfSense (FreeBSD).

                Just trying to understand how this works.

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by stephenw10 Feb 10, 2022, 4:18 PM Feb 10, 2022, 4:17 PM

                  Yeah, the extra 1 there means turbo is active but we can't see the actual speed since the CPU itself varies that with temperature and on a per core basis. That particular CPU has turbo capability shown as 2/3/4/4. So all 4 cores at 3.4GHz, 3 cores at 3.5GHz or 2 cores at 3.6GHz.
                  As far as I know there's no way to see that in FreeBSD/pfSense though.

                  Steve

                  B 1 Reply Last reply Feb 10, 2022, 4:29 PM Reply Quote 2
                  • B
                    bigjohns97 @stephenw10
                    last edited by Feb 10, 2022, 4:29 PM

                    @stephenw10 said in Is there a command to view current cpu clock speed?:

                    Yeah, the extra 1 there means turbo is active but we can't see the actual speed since the CPU itself varies that with temperature and on a per core basis. That particular CPU has turbo capability shown as 2/3/4/4. So all 4 cores at 3.4GHz, 3 cores at 3.5GHz or 2 cores at 3.6GHz.
                    As far as I know there's no way to see that in FreeBSD/pfSense though.

                    Steve

                    Thanks for the confirmation, I noticed that FreeBSD 13 has Intel SpeedShift enabled which is quicker to respond than SpeedStep.

                    I noticed that 2.6 was still on 12.3 I wonder if and when pfSense moves to v13 we would get more visibility into this?

                    1 Reply Last reply Reply Quote 1
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Feb 10, 2022, 5:16 PM

                      Maybe. If it's in FreeBSD 13 then there's a very good chance.

                      Can you test 13? Or 14 even?

                      B 1 Reply Last reply Feb 10, 2022, 5:42 PM Reply Quote 0
                      • B
                        bigjohns97 @stephenw10
                        last edited by Feb 10, 2022, 5:42 PM

                        @stephenw10 said in Is there a command to view current cpu clock speed?:

                        Maybe. If it's in FreeBSD 13 then there's a very good chance.

                        Can you test 13? Or 14 even?

                        Not without there being a hypervisor in the mix which brings in other variables.

                        1 Reply Last reply Reply Quote 0
                        • S
                          stephenw10 Netgate Administrator
                          last edited by Feb 10, 2022, 5:52 PM

                          Yes, not much point testing virtually for that.

                          B 1 Reply Last reply Feb 15, 2022, 4:47 PM Reply Quote 0
                          • B
                            bigjohns97 @stephenw10
                            last edited by Feb 15, 2022, 4:47 PM

                            @stephenw10

                            Took a serious L with the 2.6 upgrade and ended up installing from scratch.

                            Figured I would give OPNsense a try since I was starting from scratch and I can confirm the implementation of Speedshift and clock speed movement without powerd being enabled. (In fact powerd slows things down).

                            root@OPNsense:~ # sysctl -a dev.cpu | grep 'freq_levels\|freq'
                            dev.cpu.7.freq_levels: 3600/-1
                            dev.cpu.7.freq: 799
                            dev.cpu.6.freq_levels: 3600/-1
                            dev.cpu.6.freq: 799
                            dev.cpu.5.freq_levels: 3600/-1
                            dev.cpu.5.freq: 799
                            dev.cpu.4.freq_levels: 3600/-1
                            dev.cpu.4.freq: 799
                            dev.cpu.3.freq_levels: 3600/-1
                            dev.cpu.3.freq: 799
                            dev.cpu.2.freq_levels: 3600/-1
                            dev.cpu.2.freq: 799
                            dev.cpu.1.freq_levels: 3600/-1
                            dev.cpu.1.freq: 799
                            dev.cpu.0.freq_levels: 3600/-1
                            dev.cpu.0.freq: 799
                            root@OPNsense:~ # sysctl -a dev.cpu | grep 'freq_levels\|freq'
                            dev.cpu.7.freq_levels: 3600/-1
                            dev.cpu.7.freq: 799
                            dev.cpu.6.freq_levels: 3600/-1
                            dev.cpu.6.freq: 4597
                            dev.cpu.5.freq_levels: 3600/-1
                            dev.cpu.5.freq: 4597
                            dev.cpu.4.freq_levels: 3600/-1
                            dev.cpu.4.freq: 4298
                            dev.cpu.3.freq_levels: 3600/-1
                            dev.cpu.3.freq: 4298
                            dev.cpu.2.freq_levels: 3600/-1
                            dev.cpu.2.freq: 4057
                            dev.cpu.1.freq_levels: 3600/-1
                            dev.cpu.1.freq: 3999
                            dev.cpu.0.freq_levels: 3600/-1
                            dev.cpu.0.freq: 3928
                            
                            1 Reply Last reply Reply Quote 0
                            • S
                              stephenw10 Netgate Administrator
                              last edited by Feb 15, 2022, 9:30 PM

                              How did it show those things enabled? The second output is after enabling it? In the BIOS?

                              powerd relies on some driver to actually control the cpu speed, est(4) for Intel CPUs. And that relies on either hard coded values or, far more commonly, values passed to it by ACPI. It's not unusual for those to be wrong or missing unfortunately.

                              Steve

                              B 1 Reply Last reply Feb 15, 2022, 9:35 PM Reply Quote 0
                              • B
                                bigjohns97 @stephenw10
                                last edited by Feb 15, 2022, 9:35 PM

                                @stephenw10 said in Is there a command to view current cpu clock speed?:

                                How did it show those things enabled? The second output is after enabling it? In the BIOS?

                                powerd relies on some driver to actually control the cpu speed, est(4) for Intel CPUs. And that relies on either hard coded values or, far more commonly, values passed to it by ACPI. It's not unusual for those to be wrong or missing unfortunately.

                                Steve

                                No both outputs are taken right after one another it shows the proc jumping all around to different clock speeds as the processor sees fit.

                                My guess is the usage of hwpstate_intel is what allows the different visibility into the two different operating systems.

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

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                  This community forum collects and processes your personal information.
                                  consent.not_received