Real time frequency

Friday May 24th, 2013By: CyrIng

mhz is our piece of code which displays  the actual frequency of the Core i7

  • download and compile the source code
$ gcc mhz.c -o mhz
  • change for root the owner of the executable, then change its attributs with a setuid.
# chown root mhz
# chmod u+s mhz
  • make sure to load before, the following Linux daemons which provide access to the MSR registers and the SMBIOS structures
# modprobe msr
# modprobe dmi-sysfs
  • then run the program with core number as the only argument.
$ mhz 3
3200