cpacfstatsd(8)

πŸ“¦ version 2.44.1, in opensuse-leap 16.0

πŸ’… cpacfstatsd πŸ’…

okay so bestie, this one lives in the System Manager's Manual, section 8 β€” it's the daemon page, the behind-the-scenes main character of the CPACF stats saga πŸŽ€

✨ NAME ✨

cpacfstatsd β€” the CPACF statistics collection daemon process. yes, daemon. she runs in the background and you don't get to see her πŸ’…

✨ SYNOPSIS ✨

cpacfstatsd [-h|--help] [-v|--version] [-f|--foreground]

πŸ¦‹ DESCRIPTION πŸ¦‹

The cpacfstatsd controlling daemon is the one who actually does the work: she enables, disables, resets, and fetches the mainframe CPACF performance counter registers πŸ’– The daemon receives commands from the user application cpacfstats through the UNIX Domain Socket, processes them, and returns the requested information. for the full menu of available commands, go read the cpacfstats man page, iykyk ✨

🌸 Prerequisites 🌸

  • The running Linux kernel must have the CONFIG_PERF_EVENTS config option enabled. no option, no vibes 🫢
  • Libpfm version 4 or higher is needed to successfully run the daemon. version 4+. older than that? not invited to the party πŸ™ˆ
  • 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 ⭐
  • The daemon requires root privileges to interact with the performance ioctls of the kernel. yes, root. she's powerful like that πŸ‘‘

CPU hotplug is recognized by the daemon πŸ‘€ When adding or removing a CPU, the daemon makes sure the per-CPU performance counters get summed correctly. no cap, she keeps the math cute ✨

The starting daemon first checks for any stale pid file /run/cpacfstatsd.pid. If this file exists, and the process ID in the file belongs to an active process, an error message is printed to the console and the program terminates πŸ’€ so like, clean up your pid file bestie.

The daemon and the client cpacfstats communicate through a Unix Domain Socket. This socket is created by the daemon at startup with the associated socket file /run/cpacfstatsd_socket. For security reasons only members of the group cpacfstats are allowed to communicate with the daemon πŸ”₯ A system administrator should create this group and add all users which are allowed to run the cpacfstats client to the group. group chat membership required, fr fr πŸ’…

After startup, the daemon runs in the background and detaches from any terminal. Errors and warnings are posted to the syslog subsystem. Check the process list and the system syslog messages for confirmation of successful startup β€” like yes she's running but you gotta check πŸ‘‘

On regular termination the pid file, the communication socket and the associated file are removed gracefully. she cleans up after herself, iconic behavior πŸŽ€


πŸŽ€ OPTIONS πŸŽ€

  • -h or --help β€” Display help information for the command. the little "what does this do again" button 🫢
  • -v or --version β€” Display version and copyright information for the command.
  • -f or --foreground β€” Run the daemon in foreground mode, thus printing errors to stderr instead of posting them through syslog. This option might be useful when debugging daemon startup and initialization failures 🌈 like turning the lights on so you can see what's broken.

πŸ“ FILES πŸ“

  • /run/cpacfstatsd_socket
  • /run/cpacfstatsd.pid

πŸ’€ RETURN VALUE πŸ’€

  • 0 β€” The daemon was successfully set to run in the background. ⚠️ This does not imply that the daemon startup was successful, as the main initialization is done in the re-spawned process. Check the syslog for success or failure. so 0 is giving "launched", not "slayed" 😭
  • 1 β€” The daemon could not be set to run in the background.

πŸ‘‘ SEE ALSO πŸ‘‘

cpacfstats(1) β€” go read it, it's the other half of this duo ✨


that's the whole page, bestie! this iconic piece of documentation comes to you courtesy of s390-tools, dated January 2015 β€” vintage but still serving πŸ’œπŸ¦‹ mwah, go collect those counters 🌸

πŸ“¦ where this page comes from