PMDASAMPLE(1)

PMDASAMPLE(1) πŸ’–βœ¨

okay bestie, this is the pmdasample page from the General Commands Manual section β€” yes it's a real manual page, yes it's about a sample thing, and yes it's lowkey iconic. buckle up πŸŽ€


NAME 🌸

pmdasample β€” a sample performance metrics domain agent, aka a PMDA πŸ¦‹


SYNOPSIS ✨

$PCP_PMDAS_DIR/pmdasample [-D debug] [-d domain] [-i port] [-l logfile]
[-p] [-u socket] [-U username]

like, that's the whole vibe check. no notes. πŸ’…


DESCRIPTION πŸ‘‘

so pmdasample is a sample Performance Metrics Domain Agent (PMDA) and what it does is export a whole variety of synthetic performance metrics. synthetic as in fake-but-real, bestie, it's giving lab-grown metrics πŸ§ͺ✨

this PMDA was literally developed as part of the quality assurance testing for the PCP product, but it has other uses too β€” most notably in the development of new PCP clients. so if you're building a PCP client and you need something to talk to, this is your girl 🫢

the metrics exported by the sample PMDA cover the full range of:

  • data types
  • data semantics
  • value cardinality
  • instance domain stability
  • error conditions

...found in real PMDAs. basically it's the whole entire spectrum, no cap. if a real PMDA can do it, sample can do a little version of it 🌈


a brief description of the pmdasample command line options, as promised πŸ’–

  • -d β€” bestie. listen. it is absolutely crucial that the performance metrics domain number you put here is unique and consistent. like, domain should be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts. this is not a drill 😭
  • -i β€” expects PMCD to connect to pmdasample on the specified TCP/IP port. and port can be a port number or a port name, whichever you vibe with πŸ“
  • -l β€” location of the log file. by default, a log file named sample.log is written in the current directory of pmcd(1) when pmdasample is started, i.e. $PCP_LOG_DIR/pmcd. and if the log file cannot be created or is not writable? output goes to the standard error instead. fallback queen πŸ’…
  • -p β€” expects PMCD to create a pipe, and the connection to pmdasample happens via standard input and standard output. oh and btw this is the default connection mode. main character energy, it's the default for a reason πŸ‘‘
  • -u β€” expects PMCD to connect to pmdasample on the Unix domain socket named socket πŸ¦‹
  • -U β€” the user account under which to run the agent. default is the unprivileged "pcp" account in current versions of PCP, but in older versions the superuser account ("root") was used by default. glow-up arc fr fr ✨
⚠️ okay important: at most one of the options -i, -p and -u may be specified. pick one bestie, you can't have all three πŸ’€

INSTALLATION πŸŽ€

if you want access to the names, help text and values for the sample performance metrics, do the following as root:

# cd $PCP_PMDAS_DIR/sample
# ./Install

and note that the installation script also installs the DSO version of the sample PMDA, so there are in fact two PMDAs installed, and two sets of performance metrics, namely sample.* and sampledso.*. two for the price of one, we love a bundle 🫢✨

if you want to undo the installation (and remove both PMDAs), do the following as root:

# cd $PCP_PMDAS_DIR/sample
# ./Remove

and heads up: pmdasample is launched by pmcd(1) and should never be executed directly. the Install and Remove scripts notify pmcd(1) when the agent is installed or removed, so let the scripts do their thing, they got this πŸ’…


FILES 🌸

  • $PCP_PMCDCONF_PATH β€” command line options used to launch pmdasample
  • $PCP_PMDAS_DIR/sample/help β€” default help text file for the sample metrics
  • $PCP_PMDAS_DIR/sample/Install β€” installation script for the pmdasample agent
  • $PCP_PMDAS_DIR/sample/Remove β€” undo installation script for the pmdasample agent
  • $PCP_LOG_DIR/pmcd/sample.log β€” default log file for error messages and other information from pmdasample

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). configurable AND cute, it's giving ✨


DEBUGGING OPTIONS πŸ”₯

the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems β€” although ngl, the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. so if you're an end-user reading this like "what does this mean", same bestie 😭

debug is a comma separated list of debugging options. use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning πŸ‘‘

debugging options specific to pmdasample are as follows:

  • appl0 β€” verbose diagnostics for dynamic instance domains and metric mapping

(that's the whole table, one row, she's simple and she's serving πŸ’…)


SEE ALSO πŸ’–

PCPIntro(1), pmcd(1), pmdasimple(1), pmdatrivial(1), pmdatxmon(1), pcp.conf(5) and pcp.env(5).

go read those too, iykyk πŸ“šβœ¨


and that's the page bestie!! this one came from Performance Co-Pilot, tagged PCP, and it's PMDASAMPLE(1) β€” mwah, periodt πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from