PCP(1)

๐Ÿ’– PCP(1) ๐Ÿ’–

okay bestie, welcome to the General Commands Manual page for pcp and pcp-summary โ€” yes it's a whole manual page, no it's not boring, sit with me ๐Ÿซถ


โœจ NAME โœจ

pcp, pcp-summary โ€” run a command or summarize an installation ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

pcp [pcp options...]  pcp-command [command options...]
pcp [-LPV?]  [-a archive] [-D debug] [-h host] [-O origin] [-n pmnsfile]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The pcp command lives in one of two modes, and honestly she's thriving in both.

By default? She summarizes the Performance Co-Pilot (PCP) installation on the local host. And not just local โ€” you can also use this mode to summarize the installation from a remote host, or a historical installation from a set of PCP archives. This mode indirectly invokes the pcp-summary command (that's what happens when there's no other requested command, iykyk).

Alternatively, you can pass a command to pcp to run โ€” again, possibly in the context of a remote host or a set of historical archives. iconic behavior, fr fr โœจ


๐Ÿ‘‘ COMMAND MODE ๐Ÿ‘‘

When pcp is invoked with a command to run, she goes looking for the named command in $PCP_BINADM_DIR and also $HOME/.pcp/bin โ€” these are usually scripts, and they're installed with a "pcp-" prefix.

This mode of operation is the whole point: it lets system performance tools be implemented using PMAPI(3) services, while still preserving all of their usual command line options. So those options get (indirectly) augmented with the standard PCP option set, as described in PCPIntro(1). ๐Ÿซถ

It's a convenient lil mechanism for obtaining retrospective or remote monitoring capabilities while preserving the behaviour of the system tools. no cap.

For example, the pcp-free(1) utility can be invoked as follows, for recorded data from host munch:

$ pcp -a $PCP_LOG_DIR/pmlogger/munch/20140317 -O 11:35:50am free -m
             total       used       free     shared    buffers     cached
Mem:         23960      14554       9406          0        176       2137
-/+ buffers/cache:      12240      11720
Swap         12047          0      12047

A complete list of the available and installed tools is provided along with the pcp(1) usage message, but some examples include: pcp-free(1), pcp-uptime(1) and pcp-numastat(1). slay.


๐ŸŽ€ SUMMARY MODE ๐ŸŽ€

The summary report includes all of this, and honestly the way she gathers it all is giving main character energy:

  • the OS version
  • a summary of the hardware inventory
  • the local timezone
  • the PCP software version
  • the state of the pmcd(1) process and its associated Performance Metrics Domain Agents (PMDAs)
  • information about any local PCP archivers (pmlogger(1)), remote PCP archivers (pmproxy(1)), and PCP inference engines (pmie(1)) that are running

All of the displayed values are performance metric values, and you can get further information for each one with this command:

$ pminfo -dtT metric

The complete set of metrics required by pcp to produce its output is contained in $PCP_VAR_DIR/config/pmlogconf/tools/pcp-summary. ๐Ÿ’œ


๐Ÿ’… SUMMARY MODE OPTIONS ๐Ÿ’…

With no arguments, pcp reports on the local host โ€” however, the following options are accepted:

  • -a archive, --archive=archive โ€” Report the PCP configuration as described in the set of PCP archives, archive, which is a comma-separated list of names, each of which may be the base name of an archive or the name of a directory containing one or more archives. ๐Ÿ—‚๏ธ
  • -h host, --host=host โ€” Report the PCP configuration on host rather than the local host.
  • -L, --local-PMDA โ€” Use a local context to collect metrics from DSO PMDAs on the local host without PMCD.
  • -n pmnsfile, --namespace=pmnsfile โ€” Load an alternative Performance Metrics Name Space (PMNS(5)) from the file pmnsfile.
  • -O origin, --origin=origin โ€” When reporting archived metrics, start reporting at origin within the time window. โฐ
  • -P, --pmie โ€” Display pmie(1) performance information โ€” counts of rules evaluating to true, false, or indeterminate, as well as the expected rate of rule calculation, for each pmie process running on the default host. Refer to the individual metric help text for full details on these values.
  • -V, --version โ€” Display version number and exit. โœจ
  • -?, --help โ€” Display usage message and exit. ๐Ÿ™ˆ

๐Ÿ˜ญ DIAGNOSTICS ๐Ÿ˜ญ

pcp will terminate with an exit status of 1 if pmcd on the target host could not be reached, or if the set of archives could not be opened. Or 2 for any other error. she's dramatic like that ๐Ÿ’€


๐Ÿ“ FILES ๐Ÿ“

  • $HOME/.pcp/bin โ€” Per-user location for command scripts.
  • $PCP_BINADM_DIR โ€” System location for installed command scripts.
  • $PCP_VAR_DIR/config/pmlogconf/tools/pcp-summary โ€” pmlogconf(1) configuration file for collecting all of the metrics required by pcp

๐ŸŒˆ 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. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).

For environment variables affecting PCP tools, see pmGetOptions(3). ๐Ÿ’–


๐Ÿ”ฅ 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. ๐Ÿ™ˆ

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.


๐ŸŒŸ SEE ALSO ๐ŸŒŸ

PCPIntro(1), pcp-free(1), pcp-numastat(1), pcp-python(1), pcp-uptime(1), pcp-verify(1), pmcd(1), pmie(1), pmlogconf(1), pmlogger(1), pmproxy(1), pcp.conf(5), pcp.env(5) and PMNS(5).


and that's the whole page bestie ๐Ÿซถ this one comes to you from Performance Co-Pilot (that's the source, and also the version name right there in the footer, cute right?) โ€” stay hydrated, check your metrics, periodt ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from