cpacfstats(1)
π
cpacfstats β the cpacfstats(1) page, but make it make sense β¨
okay bestie, buckle up β this is the cpacfstats command from the General Commands Manual, and it's lowkey one of those tools that sounds scary but is actually just a little messenger girl running errands for a daemon. let's get into it π«Ά
β¨ NAME β¨
cpacfstats β enable, disable and display CPACF statistical data. that's the whole job. she enables, she disables, she displays. iconic behavior only π
πΈ SYNOPSIS πΈ
cpacfstats [-h|--help] [-v|--version] [-e|--enable counter ]
[-d|--disable counter ] [-r|--reset counter ] [-p|--print counter
[-n|--nonzero] ] [-j|--json]
like, yes, the bracket nesting is giving slightly unhinged, but she's valid π
π¦ DESCRIPTION π¦
so the cpacfstats client application is basically the bestie who talks to the cpacfstatsd daemon and makes things happen. that's the whole dynamic β client asks, daemon does. together they enable, disable, reset, and fetch one or all of the mainframe CPACF performance counters. teamwork, fr fr π€
here's the thing though: all counters are initially disabled and you literally have to switch them on yourself to measure CPACF activities of the system. nothing is happening until you say so, no cap. also be aware there's a slight performance penalty with CPACF counters enabled β so, like, she's not free, but she's worth it π
CPACF activity counters come in two flavors, and yes this is the moment to pay attention:
- CPU-MF β these are only available on LPARs and have to be authorized. if they are available, the counters
des,aes,sha,rng, andeccare made available. these counters can individually be activated, reset, printed, or deactivated. very much giving independent women π - PAI β a lot more detailed, like so much more detailed. the user interface only offers the counters
pai_userandpai_kernelto count CPACF usage in user-space or kernel-space. but when you print these counters, the detailed counters are shown. surprise! there's lore π
a complete list of counters can be found at the end of this manpage β so if you're looking for the full roster, keep reading bestie, it's coming π
note that the counters starting with PCKMO and Reserved are only available in the pai_kernel set. also note that the counters are designed to count successful operations. in the case of KMA this means only complete GCM operations including final hashing are counted. so if something failed, she's not counting it β she's not messy like that π
Note: CPU-MF based CPACF performance counters are available on LPARs only. PAI counters are available on all hypervisors. and for security reasons only members of the groupcpacfstatsare allowed to run thecpacfstatsclient application. so, like, permissions check before you vibe check π
π example usage scenario π
this is the part where I hold your hand through the whole thing. follow along:
- Start the
cpacfstatsddaemon with root privileges usingsystemctl start cpacfstatsd. - Check for successful startup by using the
systemctl status cpacfstatsdcommand. - Enable the CPACF counters of interest. For example, enable all counters by issuing
cpacfstats -e. - Run your applications.
- Display counter values by using the
cpacfstatscommand. Reset the cryptographic counters as required. To reset, use, for example,cpacfstats -r. - Disable all the CPACF measurements, for example, by using
cpacfstats -d. - Shutdown the
cpacfstatsddaemon by usingsystemctl stop cpacfstatsd.
see? not scary. it's literally start, check, enable, run, print, reset, disable, stop. a whole little routine, main character energy from start to finish β
π OPTIONS π
okay this is the part everyone scrolls to. here's every single flag, no skips, no cuts π
-hor--helpβ Display help information for the command. like a lil "what does this do again" button π«Ά-vor--versionβ Display version and copyright information for the command. proof she's real and legally distinct β¨-eor--enable [counter]β Enable one or all CPACF performance counters. The optional counter argument can be one of:des,aes,sha,prng,ecc, orall. If the counter argument is omitted, all performance counters are enabled. Enabling a counter does not reset it. New events are added to the current counter value. so she picks up where she left off, no dramatic restart π-dor--disable [counter]β Disable one or all CPACF performance counters. The optional counter argument can be one of:des,aes,sha,prng,ecc, orall. If the counter argument is omitted, all performance counters are disabled. Disabling a counter does not reset it. The counter value is preserved when a counter is disabled, and counting will resume using the preserved value when the counter is re-enabled. she remembers everything, she's not the type to forget π₯-ror--reset [counter]β Reset one or all CPACF performance counters. The optional counter argument can be one of:des,aes,sha,prng,ecc, orall. If the counter argument is omitted, all performance counters are reset to0. clean slate, fresh start, new era π§-por--print[-nor--nonzero][counter]β Display the value of one or all CPACF performance counters. The optional counter argument can be one of:des,aes,sha,prng,ecc,pai_user,pai_kernel, orall. If the counter argument is omitted or if there is no argument, all performance counters are displayed. If the optional-nor--nonzeroargument is given, then only PAI counters that have a non-zero value are printed. filtering out the zeros because we simply don't have time for empty results π-jor--jsonβ Display all activated counters in JSON format. The JSON contains an array of counter objects. Each object contains the propertycounterspecifying either a CPU-MF counter of one of the detailed PAI counter. Additional properties includeerroran error number if the counter could not be read,valuethe counter value if the counter could be read,spacefor PAI counters to specify user or kernel space counter set, andcounteridfor PAI counters to specify the PAI counter number as specified in the Principles of Operation. machine-readable, structured, immaculate πΈ
and the default command? it's --print all. so if you just type the command with nothing else, that's what you get. she's generous like that π
π FILES π
/run/cpacfstatsd_socket
that's the one and only file she cares about. the socket. the connection. the link between client and daemon π¦
π₯ RETURN VALUE π₯
0β Successful program execution. we love a win π1β An error occurred, reasons include: invalid argument,cpacfstatsdcould not be reached (check that the daemon is running), insufficient access rights, version mismatch between client and daemon, or the application is out of memory. The application prints a message with the details of the error and theerrnovalue. so if you see this, she'll tell you exactly what went wrong, she's not leaving you guessing π
π NOTES π
okay little PSA section, listen up:
ECC counters are only available since z15. cpacfstats will show the counters as unsupported if the hardware does not support ECC counters. so like, don't come for her, it's a hardware thing π
CPU-MF counters have to be authorized on HMC or SE to be available and are otherwise shown as unauthorized. On the HMC or SE, authorize the LPAR for each counter set you want to use. Customize the LPAR activation profile and modify the Counter Facility Security Options. You need to activate the Crypto activity counter set authorization control checkbox. yes, that's a lot of checkboxes. yes, you have to do all of them. administrative slay, unfortunately π
and that's part 1 bestie β the full counter list is still up next π
π APPENDIX π
ok so this is the part everyone scrolls past and then immediately scrolls back to, because β bestie β the detailed pai counter names are a whole journey. it's giving phone book. it's giving "the group chat has 172 members and you know three of them." but we do not skip entries on this page, so here is every single one, in order, no cap. π«Ά
KM DESKM 2key TDESKM TDESKM DES protected keyKM 2key TDES protected keyKM TDES protected keyKM AES 128bitKM AES 192bitKM AES 256bitKM AES 128bit protected keyKM AES 192bit protected keyKM AES 256bit protected keyKM AES-XTS 128bitKM AES-XTS 256bitKM AES-XTS 128bit protected keyKM AES-XTS 256bit protected keyKMC DESKMC 2key TDESKMC TDESKMC DES protected keyKMC 2key TDES protected keyKMC TDES protected keyKMC AES 128bitKMC AES 192bitKMC AES 256bitKMC AES 128bit protected keyKMC AES 192bit protected keyKMC AES 256bit protected keyKMC PRNGKMA AES 128bitKMA AES 192bitKMA AES 256bitKMA AES 128bit protected keyKMA AES 192bit protected keyKMA AES 256bit protected keyKMF DESKMF 2key TDESKMF TDESKMF DES protected keyKMF 2key TDES protected keyKMF TDES protected keyKMF AES 128bitKMF AES 192bitKMF AES 256bitKMF AES 128bit protected keyKMF AES 192bit protected keyKMF AES 256bit protected keyKMCTR DESKMCTR 2key TDESKMCTR TDESKMCTR DES protected keyKMCTR 2key TDES protected keyKMCTR TDES protected keyKMCTR AES 128bitKMCTR AES 192bitKMCTR AES 256bitKMCTR AES 128bit protected keyKMCTR AES 192bit protected keyKMCTR AES 256bit protected keyKMO DESKMO 2key TDESKMO TDESKMO DES protected keyKMO 2key TDES protected keyKMO TDES protected keyKMO AES 128bitKMO AES 192bitKMO AES 256bitKMO AES 128bit protected keyKMO AES 192bit protected keyKMO AES 256bit protected keyKIMD SHA1KIMD SHA256KIMD SHA512KIMD SHA3-224KIMD SHA3-256KIMD SHA3-384KIMD SHA3-512KIMD SHAKE 128KIMD SHAKE 256KIMD GHASHKLMD SHA1KLMD SHA256KLMD SHA512KLMD SHA3-224KLMD SHA3-256KLMD SHA3-384KLMD SHA3-512KLMD SHAKE 128KLMD SHAKE 256KMAC DESKMAC 2key TDESKMAC TDESKMAC DES protected keyKMAC 2key TDES protected keyKMAC TDES protected keyKMAC AES 128bitKMAC AES 192bitKMAC AES 256bitKMAC AES 128bit protected keyKMAC AES 192bit protected keyKMAC AES 256bit protected keyPCC Last Block CMAC DESPCC Last Block CMAC 2key TDESPCC Last Block CMAC TDESPCC Last Block CMAC DES protected keyPCC Last Block CMAC 2key TDES protected keyPCC Last Block CMAC TDES protected keyPCC Last Block CMAC AES 128bitPCC Last Block CMAC AES 192bitPCC Last Block CMAC AES 256bitPCC Last Block CMAC AES 128bit protected keyPCC Last Block CMAC AES 192bit protected keyPCC Last Block CMAC AES 256bit protected keyPCC XTS Parameter AES 128bitPCC XTS Parameter AES 256bitPCC XTS Parameter AES 128bit protected keyPCC XTS Parameter AES 256bit protected keyPCC Scalar Mult P256PCC Scalar Mult P384PCC Scalar Mult P521PCC Scalar Mult Ed25519PCC Scalar Mult Ed448PCC Scalar Mult X25519PCC Scalar Mult X448PRNO SHA512 DRNGPRNO TRNG Query RatioPRNO TRNGKDSA ECDSA Verify P256KDSA ECDSA Verify P384KDSA ECDSA Verify P521KDSA ECDSA Sign P256KDSA ECDSA Sign P384KDSA ECDSA Sign P521KDSA ECDSA Sign P256 protected keyKDSA ECDSA Sign P384 protected keyKDSA ECDSA Sign P521 protected keyKDSA EdDSA Verify Ed25519KDSA EdDSA Verify Ed448KDSA EdDSA Sign Ed25519KDSA EdDSA Sign Ed448KDSA EdDSA Sign Ed25519 protected keyKDSA EdDSA Sign Ed448 protected keyPCKMO DESPCKMO 2key TDESPCKMO TDESPCKMO AES 128bitPCKMO AES 192bitPCKMO AES 256bitPCKMO ECC P256PCKMO ECC P384PCKMO ECC P521PCKMO ECC Ed25519PCKMO ECC Ed448Reserved 1, andReserved 2.
and then β because the list literally said "hold my iced coffee" β it keeps going. yes there's more, and yes you're gonna read all of it, because we don't gatekeep counters here πβ¨
KM AES-XTS (full) 128bitKM AES-XTS (full) 256bitKM AES-XTS (full) 128bit protected keyKM AES-XTS (full) 256bit protected keyKMAC HMAC SHA 224KMAC HMAC SHA 256KMAC HMAC SHA 384KMAC HMAC SHA 512KMAC HMAC SHA 224 protected keyKMAC HMAC SHA 256 protected keyKMAC HMAC SHA 384 protected keyKMAC HMAC SHA 512 protected keyPCKMO HMAC 512 protected keyPCKMO HMAC 1024 protected keyPCKMO AES-XTS 128bit double key protected keyPCKMO AES-XTS 256bit double key protected key
like... the way that last stretch is basically all PCKMO and protected key β she's consistent, she's committed, she ate and left no crumbs π
π SEE ALSO π
cpacfstatsd(8)β your next stop, bestie. go read it, you're gonna want the whole picture π¦
and that's a wrap on cpacfstats(1), babes π this little beauty comes to you from s390-tools, dated January 2015 β vintage, but absolutely still serving π now go check your counters, you icon. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: s390-tools 2.44.1-160000.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms