PMDABPFTRACE(1)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– PMDABPFTRACE(1) πŸ’–

okay bestie, welcome to the pmdabpftrace manual page (it's a General Commands Manual thing, and yes you're in the right place πŸ’…)


✨ NAME ✨

pmdabpftrace β€” the bpftrace PMDA. that's it, that's the name, short and iconic πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so pmdabpftrace is a Performance Co-Pilot (PCP) Performance Metrics Domain Agent (PMDA), and its whole ~thing~ is that it exports metrics from bpftrace(8) scripts. that's the job. that's the vibe. no cap. 🫢


πŸŽ€ CONFIGURATION πŸŽ€

pmdabpftrace reads an optional ini-style configuration file, and she lives here:

$PCP_PMDAS_DIR/bpftrace/bpftrace.conf

this file can contain a [bpftrace] section and a [dynamic_scripts] section. and listen β€” if you turn on the dynamic scripts functionality, pls pls pls go read https://pcp.io/docs/lab.auth.html on how to set up authentication. this is highly recommended, because otherwise literally anyone could run any bpftrace(8) script as root 😭 that's not a vibe, that's a yikes.


πŸ’œ the [bpftrace] section πŸ’œ

it specifies values for these settings (defaults are in the parentheses, no secrets here):

  • bpftrace_path (bpftrace) β€” the path to the bpftrace(8) executable. where's the girl at, basically πŸ’…
  • script_expiry_time (60) β€” unnamed scripts get removed after this period of time, and we're talking seconds, in case there's been no requests for their values. ghosted = expired, periodt.
  • max_throughput (2097152) β€” the maximum throughput of bpftrace scripts, in bytes. big number, big energy πŸ”₯

🌸 the [dynamic_scripts] section 🌸

same deal, values for these settings (defaults again in the parentheses):

  • enabled (false) β€” a boolean value that says whether a script should be started on demand, by executing pmStore (3) bpftrace.control.register. this feature needs to be enabled for the PCP bpftrace datasource in grafana-pcp. iykyk.
  • auth_enabled (true) β€” a boolean value saying whether authentication is required or not. please see the note above about authentication setup πŸ‘€ (yes, the root one. that one.)
  • allowed_users (root) β€” a comma-separated list of usernames who are allowed to register bpftrace(8) scripts. the guest list, bestie. keep it tight πŸŽ€

πŸ‘‘ INSTALLATION πŸ‘‘

to install, the following must be done as root:

# cd $PCP_PMDAS_DIR/bpftrace
# ./Install

to uninstall, also as root:

# cd $PCP_PMDAS_DIR/bpftrace
# ./Remove

and a lil PSA: pmdabpftrace is launched by pmcd(1) and should never be executed directly, okay? don't do it. she's got a manager. the Install and Remove scripts notify pmcd(1) when the agent is installed or removed, so the whole thing stays coordinated πŸ’…


πŸ“ FILES πŸ“

  • $PCP_PMDAS_DIR/bpftrace/bpftrace.conf β€” configuration file for the pmdabpftrace agent
  • $PCP_PMDAS_DIR/bpftrace/Install β€” installation script for the pmdabpftrace agent
  • $PCP_PMDAS_DIR/bpftrace/Remove β€” undo installation script for the pmdabpftrace agent
  • $PCP_LOG_DIR/pmcd/bpftrace.log β€” default log file for messages from the pmdabpftrace agent
quick note bestie: the usual/default value for $PCP_PMDAS_DIR is /var/lib/pcp/pmdas and the default for $PCP_LOG_DIR is /var/log/pcp, but these settings are platform dependent, so check before you assume πŸ’–

🌈 PCP ENVIRONMENT 🌈

environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. on each installation, the file /etc/pcp.conf contains the local values for these variables. and the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). iconic behaviour fr fr ✨


πŸ’€ SEE ALSO πŸ’€

PCPIntro(1), pmcd(1) and bpftrace(8).


and that's the whole page, bestie 🧚 this was Performance Co-Pilot, PCP, and the page is PMDABPFTRACE(1) β€” mwah, go slay some metrics πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from