How to determine max CPU speed of a processor in Linux?

18,135

Solution 1

If /sys/devices/.../cpuinfo_max_freq doesn't exist, that means the cpufreq driver isn't loaded - thus the CPU should be running at full speed. So yes, /proc/cpuinfo should be correct in that situation.

Solution 2

in addition to Marcin's comment: the second number in cpufreq-info -c 0 -l divided by 1000 gives you the max MHz

Solution 3

I use /usr/bin/cpufreq-info to get the current speed, and statistics, of the processors.

Solution 4

You gotta load few modules first: acpi_cpufreq freq_table

Then you install cpufrequtils package, and run cpufreq-info and it will tell you min, max and all the in-between speeds possible.

Solution 5

On my machines dmidecode lists the current and maximum speeds of the processor(s), e.g.

mas@desktop:~$ cat /proc/cpuinfo| grep MHz
cpu MHz     : 1735.601
mas@desktop:~$ sudo dmidecode | grep MHz
    External Clock: 133 MHz
    Max Speed: 1800 MHz
    Current Speed: 1733 MHz

may be worth trying on your system.

Share:
18,135

Related videos on Youtube

Admin
Author by

Admin

Updated on September 17, 2022

Comments

  • Admin
    Admin over 1 year

    I have a few 2.6 Linux boxes, running mostly RHEL and SUSE. I know for certain the RHEL machines have power saving on via the cpu governor. When the ondemand governor kicks, /proc/cpuinfo is showing the current speed of the processor and no longer showing the maximum which limits its usefulness to me. Dmidecode shows the maximum speed, but requires root access or privilege (which is a burden in this environment).

    Aside from those two options are there any ways to get this information without really need root access?

    As an addendum, there exists /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq (for all cores) on the machines where I am seeing varying clock speeds for power savings. Does anyone know if this file does not exist then would /proc/cpuinfo be guaranteed to show the maximum speed?

    • mas
      mas almost 15 years
      /proc/cpuinfo reports the processor model name as well as the MHz. Can you just use the name to do a lookup into a file with the MHz specs for the processors you have in your environment (either on the device or via curl)?
  • Alois Mahdal
    Alois Mahdal almost 10 years
    On my Lenovo ThinkPad with i7, dmidecode does not show this per cpu, whereas cpuinfo_max_freq mentioned in baumgart's answer exists for all 4 logical CPUs.