Hi,

It seems possible to compute the CPU load by exploiting the 'perf stat'
results, in particular the GHz reported with "cycles" when using 'perf stat
-a sleep x'

For our use case example, it reports "CPU cycles 0.132 GHZ".
Knowing that the cpu frequency is 1.2 GHz (from
/sys/devices/system/cpu/cpu[01]/cpufreq/cpuinfo_cur_freq)
We can deduce the CPU load: 0.132/1.2*100=11% 

In our system, we've checked with different use cases for which we know the
expected values and using the above method allows to get very accurate values.

Can someone confirm that this method is reliable and a good way to get
accurate CPU load figures ?

Regards,
  Jerome



--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to