lkml.org 
[lkml]   [2012]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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.


\
 
 \ /
  Last update: 2012-08-31 15:01    [W:0.057 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site