PMDALIBVIRT(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

✨ PMDALIBVIRT ✨

okay bestie, welcome to pmdalibvirt(1) β€” a whole General Commands Manual page and we're gonna read it together, no cap πŸ’…


🌸 NAME 🌸

pmdalibvirt β€” it's the libvirt PMDA, and yes, that's the whole vibe of the name. short, sweet, iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

lowkey there isn't a synopsis block on this page, but the name up top is the whole synopsis. it's giving minimalism. ✨


πŸ’– DESCRIPTION πŸ’–

So pmdalibvirt is a Performance Metrics Domain Agent (PMDA, iykyk) and what it does is extract live performance data from the libvirt hypervisor and its domains (aka the VMs). live data! real time! main character energy fr fr.

And if you wanna know what each individual metric actually means, you gotta go read the libvirt documentation, because that's where the detailed description of every metric lives. not here. we're just the delivery service 🫢


πŸŽ€ INSTALLATION πŸŽ€

okay so first things first: pmdalibvirt reads an optional ini-style configuration file, and that file is

  • $PCP_PMDAS_DIR/libvirt/libvirt.conf

Inside that file, in its [pmda] section, you can override the values for these PMDA options:

  • user
  • uri
  • backing

And the defaults, if you don't say anything? They are, in order:

  • root
  • qemu:///system
  • False

periodt. those are the values used for those options respectively. πŸ’…

Now, the backing setting β€” she's the glow-up option. You use it to expand block device information to cover backing chains, but only with recent libvirt versions. newer libvirt = backing chains unlocked πŸ”₯

Then there's the old API setting, and this one's for the environments where the recent libvirt API additions are just... not available (think RHEL 6 / libvirt-0.10.2, the elders πŸ‘‘). You can use it to get some of the metrics that the newer API gives you. And regardless of which API version you're on β€” no guest agent is needed for the metrics. not a single one. slay.

⚠️ heads up bestie: using a non-root user typically requires libvirt side configuration too!! Please refer to the libvirt documentation for further details on this. don't come for me, come for the docs πŸ™ˆ

Once all the needed setup is ready, you can test the connection and install the PMDA to enable access to the names and values for the libvirt performance metrics. To install, do the following as root:

# cd $PCP_PMDAS_DIR/libvirt
# ./connect
# ./Install

And to uninstall, do the following as root:

# cd $PCP_PMDAS_DIR/libvirt
# ./Remove

pmdalibvirt is launched by pmcd(1) and should never be executed directly. Like, never ever. That's not her job, that's not her moment. 😀

The Install and Remove scripts are the ones who notify pmcd(1) when the agent is installed or removed. they're the group chat admins basically.


πŸ“ FILES πŸ“

  • $PCP_PMDAS_DIR/libvirt/libvirt.conf configuration file for the pmdalibvirt agent
  • $PCP_PMDAS_DIR/libvirt/connect connection test helper using the pmdalibvirt agent configuration
  • $PCP_PMDAS_DIR/libvirt/Install installation script for the pmdalibvirt agent
  • $PCP_PMDAS_DIR/libvirt/Remove undo installation script for the pmdalibvirt agent
  • $PCP_LOG_DIR/pmcd/libvirt.log default log file for messages from the pmdalibvirt agent

🌈 PCP ENVIRONMENT 🌈

Environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. Every time you install, the file /etc/pcp.conf contains the local values for these variables.

And plot twist: the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). options on options on options, we love to see it ✨


πŸ’œ SEE ALSO πŸ’œ

PCPIntro(1), pmcd(1), virsh(1) and libvirtd(8). go read those next, bestie, they're all in the same friend group 🫢


and that's the whole page!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this absolute icon of a manual page comes from Performance Co-Pilot, and it's the PCP flavor of PMDALIBVIRT(1). mwah. go forth and monitor your hypervisor. 😭πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from