6

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?

  • 1
    /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)? – mas Jul 30 '09 at 15:25

6 Answers6

12

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.

baumgart
  • 2,483
  • 18
  • 17
4

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

1

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

asjo
  • 1,238
  • 1
  • 8
  • 6
1

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.

mas
  • 639
  • 5
  • 9
  • 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. – Alois Mahdal Jun 04 '14 at 16:41
1

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.

Marcin
  • 2,391
  • 1
  • 17
  • 14
-1

lscpu displays the current, min, and max CPU frequency, and doesn't need root privileges.

Talya S
  • 1
  • 3