Using the CPU-measurement counter facility

Use the CPU-measurement counter facility to obtain performance data for Linux® instances in LPAR mode. The z/Architecture® CPU-measurement facilities were introduced for System z10® in October 2008.
Counter facility
The hardware counters are grouped into the following counter sets:
  • Basic counter set
  • Problem-state counter set
  • Crypto-activity counter set
  • Extended counter set
  • MT-diagnostic counter set

A further common counter set, the Coprocessor group counter set, cannot be accessed from Linux on IBM® Z.

Sampling facility
The sampling facility includes the following sampling modes:
  • Basic-sampling mode
  • Diagnostic-sampling mode
The diagnostic-sampling mode is intended for use by IBM support only.

The number and type of individual counters and the details of the sampling facility depend on your IBM Z hardware model. Use the lscpumf command to find out what is available for your hardware. For details, see IBM The CPU-Measurement Facility Extended Counters Definition for z10, z196/z114, zEC12/zBC12, and z13, SA23-2261.

A further common counter set, Coprocessor group counter set, cannot be accessed from Linux on IBM Z.

You can use the perf tool on Linux to access the hardware counters and sample data of the CPU-measurement counter facility.

To use the perf tool, you need to install the perf tool package provided with SUSE Linux Enterprise Server.

If you want to write your own application for analyzing counter or sample data, you can use the libpfm4 library. This library is available on sourceforge at perfmon2.sourceforge.net.