Obtaining debug information about the CPU-measurement counter facility

Ubuntu 22.04 LTS LPAR mode

You can obtain version information for the CPU-measurement counter and sampling facility and check which counter sets are authorized on your LPAR.

Procedure

  1. Issue the lscpumf command with the -i parameter to display detailed information and debug data about the CPU-measurement facilities.
    Example:
    # lscpumf -i
    CPU-measurement Counter Facility
    --------------------------------------------------------------------------
    Version: 3.7
    
    Authorized counter sets:
        Basic counter Set
        Crypto-Activity counter Set
        Extended counter Set
        MT-diagnostic counter Set
        Problem-State counter Set
    
    Linux perf event support: Yes (PMU: cpum_cf)
    
    CPU-measurement Sampling Facility
    --------------------------------------------------------------------------
    Sampling Interval:
         Minimum:     20800 cycles (approx. 250000 Hz)
         Maximum: 170372800 cycles (approx. 30 Hz)
    
    Authorized sampling modes:
         basic:      (sample size: 32 bytes)
         diagnostic: (sample size: 173 bytes)
    
    Linux perf event support: Yes (PMU: cpum_sf)
    
    Current sampling buffer settings for cpum_sf:
        Basic-sampling mode
            Minimum: 15 sample-data-blocks ( 64KB)
            Maximum: 8176 sample-data-blocks ( 32MB) 
    
        Diagnostic-sampling mode (including basic-sampling)
            Minimum:        90 sample-data-blocks ( 364KB)
            Maximum:     49056 sample-data-blocks ( 192MB)
            Size factor:     6
  2. Optional: For more detailed information, including debug information, use the magic sysrequest function with character p. This function triggers kernel messages.
    For example, trigger the messages from procfs:
    # echo p > /proc/sysrq-trigger
    Note: If you call magic sysrequest functions with a method other than through the procfs, you might need to activate them first.

    Find the messages by issuing the dmesg command and looking for output lines that include CPUM_CF or CPUM_SF.

    More information: For details about the information in the messages, see z/Architecture® The Load-Program-Parameter and the CPU-Measurement Facilities, SA23-2260, and the perf section in Kernel Messages, SC34-2599.