13 Commits

Author SHA1 Message Date
Szabina Korbai
95290562e0 cpumf: Implement zsh and bash autocompletion
Add autocompletion script generation for the cpumf
family of tools (chcpumf, lscpumf, lshwc, lspai, pai)

Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Szabina Korbai <szkorbai@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2025-12-10 14:40:52 +01:00
Thomas Richter
3a96e8826f cpumf: Add lspai program and man page to display PAI counter sets
Add lspai program and man page to display Processor Activity
Information (PAI) facility counter sets in the same way as
lscpumf for the CPU Measurement Facility counter sets.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2023-08-21 17:09:23 +02:00
Jan Höppner
463189bf60 cpumf: Move man pages to System commands section
lscpumf, lshwc, and pai are system commands but the corresponding man
pages are located in section 1 for user commands.

Move the man pages to section 8 for system commands.

Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/135
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-06-03 18:40:36 +02:00
Thomas Richter
d7b1cbad8b cpumf/pai: Add Processor Activity Instrumentation tool
The Processor Activity Instrumentation facility (PAI) uses the
perf_event_open system call to report data and the crypto counter
values. The data can be inspected with the perf tool in a very
generic way using raw data report and a hex dump utility.

The pai tool also uses the perf_event_open system call to record the
data, but uses specialized event attributes for recording detailed
information such as the recording of fork, exit, exec system call
events and context switch events.
Cryptography counter values are appended as raw data attachments.

The pai command can be used for recording and reporting.
Also a list of CPUs can be specified.
The recording ring buffers are created per CPU
and are named paicrypto.XXX where XXX stands for the CPU number.
The numbering scheme has leading zeros, such as 007 for CPU number 7.

For invocation and possible command line options see the man page.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-05-13 11:42:51 +02:00
Thomas Richter
fbcb3f384a cpumf/chcpumf-lscpumf: Use libcpumf.a library functions
Use new library functions defined in libcpumf/libcpumf.a

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-02-21 12:54:34 +01:00
Thomas Richter
27a562da0a cpumf/lshwc: Program to extract complete counter sets
Program reads complete counter sets from any CPU by opening
device /dev/hwctr which is available with linux version 5.12.
The counter sets and CPUs can be specified on the command line.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2021-05-20 18:50:48 +02:00
Jan Höppner
ed52031821 cpumf: Remove TESTS from Makefile
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-08-21 09:12:29 +02:00
Thomas Richter
199b030580 cpumf: Rewrite chcpumf and lscpumf in C
Rewrite lscpumf and chcpumf in C. The previous version
habe been written in perl which require a lot of instructure.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-05-29 15:18:31 +02:00
Thomas Richter
1086548607 cpumf: Add IBM z15 extended counter defintion file
Add IBM Z15 extended counter definition file to Makefile
DATA_FILES list.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2020-03-16 13:39:10 +01:00
Thomas Richter
f110a77b68 cpumf: Add support for CPU-Measurement Facility counters SVN 6
Add support for CPU-Measurement facility counter second version
number 6. This adds some more counters to the crypto counter set.
Extended counter set is the same as for z14.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2019-07-15 16:06:53 +02:00
Hendrik Brueckner
d121ffa3f0 cpumf/z14: split counter sets according to CFVN/CSVN (part 1/2)
With z14, the counters in the problem-state are reduced resulting
in an increased first version number of the CPUM CF.  To adapt to
this change, split the counter sets according to their counter
first and second version number.  The second version number controls
the crypto-activity and extended counter set.  Treat the crypto-activity
counter set as generic, as the extended counter set is already handled
based on hardware models.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
2018-01-30 15:35:39 +01:00
Martin Schwidefsky
57f18c5f59 cpumf: Add extended counter defintion files for IBM z14
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[brueckner: Prefer plural for counter names]
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
2018-01-30 15:35:18 +01:00
Michael Holzheu
b627b8d8e1 Initial s390-tools-2.0.0 import
This commit is based on the s390-tools-1.39.0 version.

Changes on top of s390-tools-1.39.0:

 - Add MIT license to all source files
 - Add LICENSE file
 - Transform REAMDE to README.md (markdown)
 - Add AUTHORS.md file
 - Add CONTRIBUTING.md file
 - Move changelog from README to CHANGELOG.md file

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-08-21 10:55:40 +02:00