Is there any way to check at which clock speed my processor is running?

I have already tried cat /proc/cpuinfo but the clock speed I'm running isn't showing. I know Ubuntu 12.04 (Precise Pangolin) requires 700 MHz and VGA, but will an AMD Mobile Sempron work?

share|improve this question
    
You need more specific on the second part of your question. Do you know the model number? – LiveWireBT Nov 20 '12 at 6:55
    
Thank you for all the answers but I am good now! – user1610406 Nov 20 '12 at 23:04

12 Answers 12

up vote 129 down vote accepted

From the command line type lscpu. The information will be at CPU MHz:

~$ lscpu | grep MHz
CPU MHz:               804.901
CPU max MHz:           3200.0000
CPU min MHz:           800.0000
share|improve this answer
10  
Note that the value of CPU MHz is not fixed and may change by the second. – Cerin Jan 30 '14 at 15:53
12  
If you'd like to have it update in real-time, this will help: watch -n1 "lscpu | grep 'MHz' | awk '{print $1}'". – Amal Murali Nov 16 '14 at 14:39
1  
@Ivan: Sorry, disregard that. The output of this command: watch -n1 "lscpu | grep 'MHz' | awk '{print $1}'" – Amal Murali Dec 21 '15 at 20:52
2  
@Ivan: Okay, here you go: watch -n1 "lscpu | grep 'CPU MHz' | awk '{print $1}'" – Amal Murali Dec 21 '15 at 22:47
1  
@Ivan: For a momentary observation, you don't need watch. This would do: lscpu | grep 'CPU MHz' | awk '{ print $3; }'. I'm not sure about the exact output you're getting on your system. I'll explain the command if that helps: first lscpu gets the full output that contains information regarding your CPU, grep then searches for CPU MHz and prints out just that line, awk takes out the $N-th block and displays it out. And if you want the result to change in real-time, then wrap the command in a watch -n1 "...". – Amal Murali Dec 22 '15 at 10:51

There are a couple of ways:

  1. lscpu or more precise lscpu | grep "MHz".
    This will give you the general MHz for the CPU.

    $ lscpu | grep "MHz".
    CPU MHz:               1600.000
    
  2. cat /proc/cpuinfo or more precise cat /proc/cpuinfo | grep "MHz".
    This will give you the individual MHz for each CPU Core. So if you have an Core 2 Duo, AMD Bulldozer, Core i7, etc.. it will show the MHz for each core.

    $ cat /proc/cpuinfo | grep "MHz"
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 1600.000
    cpu MHz     : 3400.000
    
  3. lshw -c cpu or more precise version: lshw -c cpu | grep capacity
    Will give you the general MHz. Same as lscpu.

    $ lshw -c cpu | grep capacity
    WARNING: you should run this program as super-user.
           capacity: 1600MHz
    WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
    
  4. sudo dmidecode -t processor or more precise: sudo dmidecode -t processor | grep "Speed" Will not only give you a MHz in use but also the Maximum you can push / overclock your CPU to.

    $ sudo dmidecode -t processor | grep Speed
    [sudo] password for cyrex: 
        Max Speed: 4000 MHz
        Current Speed: 2666 MHz
    

Out of all of this, lshw and dmidecode provide the best information out of your CPU.

You can also target the current MHz detected by the kernel by querying the log files:

cat /var/log/dmesg | grep "MHz processor" - For the current detected MHz speed

cat /var/log/kern.log | grep "MHz processor" - For the current and past detected MHz speeds. Will not work in some cases, that is why I posted the dmesg one first.

And that's all I can remember from the top of my head. I am fairly certain there are other ways, just don't remember right now. Of course, talking about terminal ways.

share|improve this answer
    
For me, all options except dmidecode gave a false reading: I'm overclocking an intel E6600 2.4ghz chip on a gigabyte ga-965p-ds3 3.3 board with 7x multiplier & 400mhz CPU frequency to give 2.8ghz CPU, but the stock multiplier is 9 (9x266=2.4ghz) so I suspect the rest of the tools assume multiplier is stock and times that by the CPU mhz, so in my case they all give 3.6ghz. – dez93_2000 Oct 31 '14 at 22:30
2  
dmidecode seems to be the only one to accurately report the clock speed when overclocking – Avindra Goolcharan Mar 1 '17 at 22:45
    
@AvindraGoolcharan Actually that is very good to know. Thank you. – Luis Alvarado Mar 1 '17 at 23:06
    
lscpu gives me max and min frequency, but not the current one. cat /proc/cpuinfo tell me lots of stuff about my ARM cores, but no frequency at all. lshw doesn't exist. dmidecode -t processor gives me an unhandled fault. Those may work on your PC, but not on my embedded linux. cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq is the way to go. – Philippos May 3 '17 at 14:32
    
On my system with an Intel Core i5-7200U (base frequency 2.5 GHz; Turbo Boost up to 3.1 GHz) and Ubuntu 16.04, this is what I see. (I used ... | grep Hz to easily find these.) lscpu: "Model name: ... 2.50GHz" (base), "CPU MHz: 624.796" (current), "CPU max MHz: 3100.0000" (turbo). lshw: "product: ... 2.50GHz" (base), "capacity: 3100MHz" (turbo). dmidecode: "Version: ... 2.50GHz" (base), "Max Speed: 2500 MHz" (base), "Current Speed: 2400 MHz" (some value from DMI table). – Cerran Jul 28 '17 at 16:56

For the current CPU speed one can dynamically watch this change in real time using:

sudo watch -n 1  cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

To see the maximum CPU speed, use:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq 
share|improve this answer
3  
+1, I know this is an Ubuntu site, but this appears to be the only answer providing a command that is completely OS independent. – Andy E Apr 24 '14 at 11:53
    
If you get Permission Denied trying to read scaling_max_freq, try cpuinfo_max_freq. – LightStruk Nov 7 '14 at 16:29
1  
cpufreq/cpuinfo_cur_freq doesn't exist – Ken Sharp Aug 5 '16 at 23:51
1  
+1, even on several ARM-based systems running ubtunu only this solution works. Each and every other "solutions" given on this page fail there, while this works everywhere. – Philippos May 9 '17 at 6:24
    
On my system I need to use scaling_cur_freq as the filename, not cpuinfo_cur_freq which no longer seems to exist. So the full command is: cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq – Carpetsmoker Dec 22 '17 at 12:15

indicator-cpufreq-selector is a nice little indicator tool which shows your current cpu frequency. You can even select the desired cpu frequency.

enter image description here

However last update for this tool was on 2015-10-19.

share|improve this answer
4  
You can install it using sudo apt-get install indicator-cpufreq. – Wilf Feb 26 '14 at 23:00
2  
And after installing, you'll need to reboot before it will show up. – talyric Mar 30 '15 at 19:39
    
Doesn't work well in newer Ubuntus, if at all. – Ken Sharp Aug 5 '16 at 23:51

I would just like to add i7z to this list. Contrary to the other options, this works better for CPUs in the i7, i5 and i3 series that have TurboBoost.

share|improve this answer
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
share|improve this answer

In a terminal, enter:

cat /proc/cpuinfo | grep name

It should display the exact model of your CPU.

This Wikipedia page on the Sempron will give you detailed specifications.

share|improve this answer

I'd like to point out sudo is needed for Ian's answer above:

sudo cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

However you can get the same results without sudo using:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

My favourite is to use Conky where you can paint your own picture:

Conky.gif

This sits on the right of my built-in display all the time. The relevant code for the CPU section is:

${color2}${voffset 5}Intel® i-7 3630QM 3.4 GHz: ${color1}@  ${color green}${freq} MHz   
${color}${goto 13}CPU 1 ${goto 81}${color green}${cpu cpu1}% ${goto 131}${color3}${cpubar cpu1 18}
${color}${goto 13}CPU 2 ${goto 81}${color green}${cpu cpu2}% ${goto 131}${color3}${cpubar cpu2 18}
${color}${goto 13}CPU 3 ${goto 81}${color green}${cpu cpu3}% ${goto 131}${color3}${cpubar cpu3 18}
${color}${goto 13}CPU 4 ${goto 81}${color green}${cpu cpu4}% ${goto 131}${color3}${cpubar cpu4 18}
${color}${goto 13}CPU 5 ${goto 81}${color green}${cpu cpu5}% ${goto 131}${color3}${cpubar cpu5 18}
${color}${goto 13}CPU 6 ${goto 81}${color green}${cpu cpu6}% ${goto 131}${color3}${cpubar cpu6 18}
${color}${goto 13}CPU 7 ${goto 81}${color green}${cpu cpu7}% ${goto 131}${color3}${cpubar cpu7 18}
${color}${goto 13}CPU 8 ${goto 81}${color green}${cpu cpu8}% ${goto 131}${color3}${cpubar cpu8 18}
${color1}All CPU ${color green}${cpu}% ${goto 131}${color1}Temp: ${color green}${hwmon 2 temp 1}°C ${goto 250}${color1}Up: ${color green}$uptime
share|improve this answer

I wanted to share this as a comment, but dont have many reputations on askubuntu, People who want to use indicator-cpufreq do not need to reboot the computer. Resetting the current X session is enough to display the icon.

sudo apt-get install indicator-cpufreq   
DISPLAY=:0 compiz --replace

You can validate the Performance and Powersave option by seeing the current frequency by

watch -d "cat /proc/cpuinfo | grep -i Mhz"

As soon as you click on a lower frequency / Powersave, the powermanagement of the CPU kicks in, thereby reducing the clock cycle.

share|improve this answer

Sample output of cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 774.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 1600.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 800.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 774.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

Here cpu MHz means current cpu frequency. You can run cpufreq-info to understand easily.

share|improve this answer
    
redundant and long ! – Rishav Ambasta Dec 1 '16 at 6:24

watch -n1 "cat /proc/cpuinfo | grep 'MHz'" is my favourite, although if you have Turbo Boost (or Turbo Core if AMD), you'll probably prefer sudo watch -n 1 -d cpupower monitor (which uses cpupower from the linux-tools group).

share|improve this answer

In a Linux terminal type the following command to get the CPU core name and it's current speed:

cat /proc/cpuinfo | grep -E "model name|cpu MHz"

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.