Andrej,
On Wed, Oct 15, 2008 at 7:32 AM, Andrej van der Zee <[EMAIL PROTECTED]> wrote: > Sorry, let me be more specific. Obviously I need the number of cycles > per second to convert cycles to seconds. Is it possible to get this > value programmatic? And supposedly I have the value, is there anything > against using it in a simple formula like: CPU_SEC = MEASURED_CYCLES / > CYCLES_PER_SEC. > You can get the cycles per second from the frequency of the CPU. This is available in /proc/cpuinfo and expressed in MHz. 1MHz is 1 million cycles per second. However, you have to be careful with CPU clock speed throttling, i.e., varying clock frequency based on utilization. To avoid problems, you need to lock the speed by forcing the min/max frequencies via sysfs. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel