Messages in this thread | | | Date | Fri, 31 Aug 2012 14:26:17 +0200 | From | Borislav Petkov <> | Subject | Re: Get the min and max frequency of a processor |
| |
On Fri, Aug 31, 2012 at 06:52:46AM -0300, Marcos Souza wrote: > Nothing is wrong with access /sys, but I thought there was another > way, like an API or something else.
Ah, there's no API, AFAICT.
Also, tools/power/cpupower/ uses sysfs too - you could reuse that code if you don't feel like writing it yourself. The function is cpufreq_get_hardware_limits()
Ok, technically, there is also a way to query the CPU's MSRs directly but this is a bit more involved than reading sysfs nodes.
HTH.
-- Regards/Gruss, Boris.
| |