3

I have a Linux PC with a 3.4 GHz CPU. I must check this processor to see if it actually runs at that speed. Is there a benchmark available? I ran sysbench but it only provides time of completion, and I must find the maximum (actual) clock rate.

maxschlepzig
  • 57,532

4 Answers4

4

Use the command:

lscpu

To know all your CPU Specs:

To get the specific frequency of your CPU use the command with a grep like so:

lscpu | grep MHz

It will give you output like:

CPU MHz:               2723.789

To see realtime CPU speeds fluctuation use :

watch -n1 "lscpu | grep MHz | awk '{print $1}'";

https://askubuntu.com/questions/916382/ubuntu-get-actual-current-cpu-clock-speed

0

You can run lscpu | grep MHz and it will tell you what the CPU is running at now.
You can run cpufreq-info | grep "frequency is" to see what it's supposed to be.
sudo powertop launches a utility; click twice on Tab to see the "Frequency stats" tab which updates continually for a larger sample.

However, Intel SpeedStep capable CPUs and AMD PowerNow! CPUs vary their clock speed based on load, running above spec when needed and power management permits. Therefore, you may see a CPU running faster than spec.

Therefore, to find the maximum (actual) clock rate, identify the CPU model, then go to https://ark.intel.com/content/www/us/en/ark.html#@Processors or https://www.amd.com/en/products/specifications/processors and search on the processor model to find the maximum clock rate.

K7AAY
  • 3,816
  • 4
  • 23
  • 39
0

The frequency printed by lscpu or the one you see with cat /proc/cpuinfo isn't necessarily the real CPU frequency. Depending on your hardware and BIOS settings the real frequency might be quite different. For example if you have configured the BIOS to always run the CPU in turbo mode and disable all frequency scaling. Then lscpu and cat /proc/cpuinfo likely show you just the base frequency.

On Intel CPUs (and perhaps newer AMD ones), you can derive the current CPU frequency by looking at a few CPU counters, e.g. with the perf stat command. I wrote the small utility cpufreq that implements this method. See also my StackOverflow answer for some background.

Thus, you can make sure that your CPU cores run at top speed1 and then call the cpufreq utility in parallel to get the real maximum CPU frequency.


1 Either by executing a CPU intensive benchmark such that the CPU frequency of all cores is scaled up or by disabling CPU frequency scaling by other means (e.g. by activating the right tuned profile, e.g. with tuned-adm profile latency).

maxschlepzig
  • 57,532
0

The i7z tool provides live data like clock rates for Intel Core i3/i5/i7 CPUs. You can watch turbo frequencies, multipliers etc. change due to power management as well as the amount of time spend in sleep states (C0, C1,...). You could generate some load by running:

cat /dev/urandom > /dev/null

while watching the CPU frequency.

K7AAY
  • 3,816
  • 4
  • 23
  • 39