On Feb 9, 2008 8:52 PM, Dan Upton <upton@...> wrote:
> Hi all,
> I recently installed perfmon2 on a Core2 Duo running kernel 126.96.36.199.
> I noticed under /sys/devices/system/cpu/cpuN, there's a perfmon
> directory that seems to have references to various counting
> structures. Is there any documentation for these files? Specifically
There is documentation in the kernel source tree:
However note that those files report perfmon internal performance/debug
statistics. They are unrelated to the actual performance counters. The
counts are global and not per-process.
> I'm wondering if there's anyway to use these files so that one process
> could read performance data about another--basically, one application
> is pinned to a core and starts the performance counters (either itself
> or via being executed under pfmon), and then a second application
> could just read those files to see live counter values.
You do not need to run on CPUX to read stats about CPUx. But no
counter values are reported that way, even for system-wide measurements.
In system-wide, you need to run on the monitored CPUs to read the performance
Hope this helps.