Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
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

5 Answers 5

up vote 10 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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

share|improve this answer

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|improve this answer
    
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 4 at 16:41

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.