Collecting CPU-measurement sample data

6.10 LPAR mode

Use the perf tool to read CPU-measurement sample data.

Procedure

Issue a command of this form to read sample data:
# perf record -e cpum_sf/SF_CYCLES_BASIC/ -- <path_to_app>
Where <path_to_app> is the path to the application for which you want to collect sample data. If you specify -a instead of the double hyphen and path, system-wide sample data is collected.
Instead of the symbolic name, you can also specify the raw event name rB0000.

Example

# perf record -e cpum_sf/SF_CYCLES_BASIC/ -- /bin/df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/dasda1            6967656   3360508   3230160  51% /
none                    942956        88    942868   1% /dev/shm
/dev/dasdb1            6967656   4132924   2474128  63% /root
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.001 MB perf.data (~29 samples) ]

What to do next

You can now display the sample data by issuing the following command:
# perf report

For more information about collecting and displaying sample data with the perf command, see the perf-record and the perf-report man pages.

Hint: You can use the perf record -F option to collect sample data at a high frequency or the perf record -c option to collect sample data for corresponding short sampling intervals. Specified values must be supported by both the CPU-measurement sampling facility and perf. Issue lscpumf -i to find out the maximum and minimum values for the CPU-measurement sampling facility. If perf fails at a high sampling frequency, you might have to adjust the kernel.perf_event_max_sample_rate system control to override default perf limitations.