There are many ways to get the cpu processor frequency:
1. zcat /proc/config.gz |grep CONFIG_HZ # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250
means 250 Hz
2. cat /proc/interrupts |grep LOC; sleep 1;cat /proc/interrupts |grep LOC LOC: 43986173 44089526 43986113 44089117 LOC: 43986424 44089777 43986364 44089368
means that there are 4 logical processors whose frequency: 43986424 - 43986173 ~ = 250.
Alternatively, you can get the var cpu_khz value in proc.c in kernel space.
source share