performancelinux-kernelperformancecounterpapi

How can I get page faults statistics from kernel


How can I get page faults statistics from kernel for my application while it is running? What about other events, like inter-cpu migrations count in SMP nodes, or number of context switches?

I want to count such events for various small parts of the program.

Thanks.


Solution

  • You'll be wanting to use the "perf" tools packaged with the kernel. See here.