I am aware of these answers:
https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x
View the current clock Speed of a CPU in OS X?
Which refer to Intel Power Gadget
as a way to obtain current CPU frequency, is there a program/method to obtain this information from the terminal?
sysctl hw.cpufrequency
only shows the nominal frequency of the CPU, i.e. what the manufacturer has stated. It does not consider Turbo Boost or lower frequencies when CPU is idle. (For example if CPU is i5, 1.4GHz, it will always state 1.4GHz)
The C
solution given it SO using sysctl.h
has the same effect.