lshwc(8)

NAME
lshwc - extract CPU Measurement Facilities counter sets

SYNOPSIS
lshwc [-a][-H][-s][-x][-X] [-l count] [-i interval] [cpulist][:sets]
lshwc -h|--help
lshwc -v|--version

DESCRIPTION
The lshwc command extracts complete counter sets from the CPU Measurement Facilities for Linux on Z. Counter sets can be specified and extracted for individual CPUs. The output is a comma-separated values file. Each line starts with a timestamp and the CPU number, followed by the extracted counter values.

OPTIONS

-h, --help
    Displays help information, then exits.

-v, --version
    Displays version information, then exits.

-a, --allcpu
    Displays counter values from each CPU. The default is a total summary line of all counters from all CPUs.

-i, --interval seconds
    Specifies a time interval, in seconds, that the command waits between read operations. The default is 60 seconds.

-l, --loop count
    Performs the specified number of read operations.

-H, --hide
    Do not display values of undefined counters.

-s, --short
    Displays counter names as short names in the heading. A short name consists of a letter for the counter set followed by a number. For example, this flag displays counter number 0 in the basic counter set as B0 instead of Cycles. Valid counter set letters are:

    B   Basic counter set

    P   Problem state counter set

    C   Crypto counter set

    E   Extended counter set

    M   MT-Diagnostic counter set

    U   Undefined counter.

-x, --hex
    Displays counter values as hexadecimal values.

-X, --hex0x
    Displays counter values as hexadecimal values with a leading 0x prefix.

[cpulist][:sets]
    A comma-separated list of CPUs. Each CPU can optionally be followed by characters that specify the counter set. See below for details.

  CPU List and counter-set specification
In the comma-separated list of CPUs, each element is a CPU or a range of CPUs. By default, lshwc lists all CPUs.

The CPU list can be followed by an optional list of characters that specify the counter sets to be extracted, preceded by a colon. The characters can be upper or lower case. By default, all counter sets are used.

b   Include the basic counter set.

c   Include the crypto counter set.

e   Include the extended counter set.

m   Include the MT_Diagnostic counter set.

p|u Include the problem counter set.

a   Include all known counter sets (default).

EXAMPLES
The first example enables the basic and problem counter sets on CPU 0 and 1. Two read operations are performed and a summary line is printed for each read operation.

# lshwc -l2 0-1:BP
Date,Time,CPU,CPU_CYCLES(0),INSTRUCTIONS(1),L1I_DIR_WRITES(2),L1I_PENALTY_CYCLES(3),L1D_DIR_WRITES(4),
	L1D_PENALTY_CYCLES(5),PROBLEM_STATE_CPU_CYCLES(32),PROBLEM_STATE_INSTRUCTIONS(33)
2021-04-01,11:50:32,Total,125422,39421,304,13953,454,
	97489,0,0
2021-04-01,11:51:32,Total,68074231,16386850,194028,21382384,317227,
	104503489,777383,14198

This example shows the counter values of the problem state counter set per CPU. CPU 0 and CPU 1 is selected.

# lshwc -l3 -a 0-1:P
Date,Time,CPU,PROBLEM_STATE_CPU_CYCLES(32),PROBLEM_STATE_INSTRUCTIONS(33)
2021-04-01,11:54:47,CPU0,0,0
2021-04-01,11:54:47,CPU1,0,0
2021-04-01,11:54:47,Total,0,0
2021-04-01,11:55:47,CPU0,818775,14198
2021-04-01,11:55:47,CPU1,125689,1306
2021-04-01,11:55:47,Total,944464,15504
2021-04-01,11:56:47,CPU0,3207071426,1489122591
2021-04-01,11:56:47,CPU1,3225092021,1489278312
2021-04-01,11:56:47,Total,6432163447,2978400903

SEE ALSO
lscpumf(8) chcpumf(8)