11

All programs I've tried seem to be listing Hz from cpu's specifications not actually checking what the current Hz really is.

for example a processor is marketed with 4GHz.But this is the max (unless you over/under/clock) and if the cpu isn't doing anything or is getting too hot it will throttle down.

The program always will say 4Ghz even when the CPU is at 2Ghz.I want to avoid this and know the real Hz.

What programs actually check current cpu hz and not just read cpu specifications?

fdsfgdsdf
  • 171
  • 1
  • 3
  • 11
  • I want the program to show the Hz in realtime if possible. – fdsfgdsdf Apr 08 '14 at 18:18
  • http://askubuntu.com/questions/218567/any-way-to-check-the-clock-speed-of-my-processor ( sudo dmidecode -t processor | grep "Speed" ) – Rinzwind Apr 08 '14 at 18:23
  • @Rinzwind I like this the most because it displays cpu hz ever ysecond. sudo watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq but I dont have cpu folder in cpu folder so I get no such file or directory.What should I do? – fdsfgdsdf Apr 08 '14 at 18:39
  • ok but I would added it to the link 3 people accepted as duplicate ;) – Rinzwind Apr 08 '14 at 18:40

1 Answers1

16

You can easily check the current CPU frequency using the following command:

watch -n 0 "lscpu | grep 'MHz'"

You can also get the current cpu frequency with this command:

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

Most modern CPUs can adjust their clock frequency. The default governor on linux is "on demand" which keeps the clock speed low to save power when idle, and speeds it up to do work when needed.

Visit https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt for further details.