When a Raspberry Pi feels slow, I want to know the clock speed it really runs at. The usual file in /sys only tells half of the story.
vcgencmd measure_clock arm
This returns the current frequency of the Arm cores, in hertz. The same command takes other clocks as an argument, among them core (the GPU core), emmc (the SD card interface), v3d, isp and hdmi.
The other way is a file the kernel exposes:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
That number is in kilohertz, so divide by 1000 for megahertz. The docs point out the catch. It is the frequency the kernel requested, and throttling, for example at high temperatures, can mean the CPU actually runs slower than reported. The vcgencmd command gives an instantaneous measurement of the actual Arm clock.
So when I suspect throttling, I’d run both and compare them while the board is busy. If the two differ, look at the temperature with vcgencmd measure_temp, which reports the SoC temperature from its internal sensor.
One caveat: the docs say the result is displayed in hertz, not megahertz, so divide by a million to compare it with the other number. It is also a snapshot of one moment, not an average.
Further reading: vcgencmd documentation, Overclocking and frequency