PCP2ARROW(1)

πŸ“¦
version 7.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– PCP2ARROW(1) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about pcp2arrow β€” it's from the General Commands Manual, it's a pcp-to-arrow metrics exporter, and it's lowkey iconic.


✨ NAME ✨

pcp2arrow β€” pcp-to-arrow metrics exporter πŸŽ€


🌸 SYNOPSIS 🌸

pcp2arrow [-jLnrRVz?]  [-8|-9 limit] [-a archive] [-A align]
[--archive-folio folio] [-c config] [--container container] [-D debug]
[-h host] [-i instances] [-J rank] [-K spec] [-o outfile] [-O origin]
[-s samples] [-S starttime] [-t interval] [-T endtime] [-Z timezone]
[metricspec...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so. pcp2arrow is a customizable performance metrics exporter tool from PCP to Apache Arrow. it's especially useful as a way to produce the Parquet columnar data format, for use with Pandas or similar data analysis modules. and the way it works is genuinely so clean: each PCP metric, and each instance of each metric, becomes a unique column named according to the PCP metric specification β€” that's the metric name followed by a square-bracket-enclosed instance name (for metrics that have an instance domain). 🫢

any available performance metric β€” live or archived, system and/or application β€” can be picked for exporting, using either command line arguments or a configuration file. periodt.

with no metricspec options, all available metrics are considered for exporting. everything. the whole buffet. πŸ’…

pcp2arrow is a close relative of pmrep(1). so go refer to pmrep(1) for the metricspec description accepted on the pcp2arrow command line. and see pmrep.conf(5) for the description of the pcp2arrow.conf configuration file syntax. this page right here describes the pcp2arrow-specific options and the configuration file differences versus pmrep.conf(5). also pmrep(1) lists some usage examples, and most of those are applicable with pcp2arrow as well. iykyk. ✨

only the command line options listed on this page are supported, bestie. other options available for pmrep(1) are not supported. don't try it.

options via environment values (see pmGetOptions(3)) override the corresponding built-in default values (if any). configuration file options override the corresponding environment variables (if any). and command line options override the corresponding configuration file options (if any). it's a whole hierarchy, and it's giving main character energy. πŸ‘‘


πŸŽ€ CONFIGURATION FILE πŸŽ€

pcp2arrow uses a configuration file with syntax described in pmrep.conf(5). the following options are common with pmrep.conf: version, source, speclocal, derived, header, globals, samples, interval, type, type_prefer, ignore_incompat, names_change, instances, live_filter, rank, limit_filter, limit_filter_force, invert_filter, predicate, omit_flat, include_labels, precision, precision_force, count_scale, count_scale_force, space_scale, space_scale_force, time_scale, time_scale_force.

the rest of the pmrep.conf options are recognized but ignored for compatibility. they're just there, chilling. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

the available command line options are:

  • -8 limit, --limit-filter=limit β€” limit results to instances with values above/below limit. a positive integer will include instances with values at or above the limit in reporting. a negative integer will include instances with values at or below the limit in reporting. a value of zero performs no limit filtering. this option will not override possible per-metric specifications. see also -J and -N. πŸ’–
  • -9 limit, --limit-filter-force=limit β€” like -8 but this option will override per-metric specifications. bold. πŸ”₯
  • -a archive, --archive=archive β€” performance metric values are retrieved from the set of Performance Co-Pilot (PCP) archive files identified by the archive argument, 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. πŸ—‚οΈ
  • -A align, --align=align β€” force the initial sample to be aligned on the boundary of a natural time unit align. refer to PCPIntro(1) for a complete description of the syntax for align. πŸ“
  • --archive-folio=folio β€” read metric source archives from the PCP archive folio created by tools like pmchart(1) or, less often, manually with mkaf(1). 🌈
  • -c config, --config=config β€” specify the config file or directory to use. in case config is a directory, all files in it ending .conf will be included. the default is the first found of: ./pcp2arrow.conf, $HOME/.pcp2arrow.conf, $HOME/pcp/pcp2arrow.conf, and $PCP_SYSCONF_DIR/pcp2arrow.conf. for details, see the above section and pmrep.conf(5). ✨
  • --container=container β€” fetch performance metrics from the specified container, either local or remote (see -h). πŸ“¦
  • -C, --check β€” exit before reporting any values, but after parsing the configuration and metrics and printing possible headers. a little vibe check before the real thing. βœ…
  • -h host, --host=host β€” fetch performance metrics from pmcd(1) on host, rather than from the default localhost. 🏠
  • -H, --no-header β€” do not print any headers. 🚫
  • -i instances, --instances=instances β€” retrieve and report only the specified metric instances. by default all instances, present and future, are reported. refer to pmrep(1) for complete description of this option. πŸ‘€
  • -j, --live-filter β€” perform instance live filtering. this allows capturing all named instances even if processes are restarted at some point (unlike without live filtering). performing live filtering over a huge number of instances will add some internal overhead, so a bit of user caution is advised, bestie. see also -n. πŸ¦‹
  • -J rank, --rank=rank β€” limit results to highest/lowest ranked instances of set-valued metrics. a positive integer will include highest valued instances in reporting. a negative integer will include lowest valued instances in reporting. a value of zero performs no ranking. ranking does not imply sorting, see -6. see also -8. πŸ†
  • -K spec, --spec-local=spec β€” when fetching metrics from a local context (see -L), the -K option may be used to control the DSO PMDAs that should be made accessible. the spec argument conforms to the syntax described in pmSpecLocalPMDA(3). more than one -K option may be used. πŸ”‘
  • -L, --local-PMDA β€” use a local context to collect metrics from DSO PMDAs on the local host without PMCD. see also -K. πŸ’»
  • -n, --invert-filter β€” perform ranking before live filtering. by default, instance live filtering (when requested, see -j) happens before instance ranking (when requested, see -J). with this option the logic is inverted and ranking happens before live filtering. πŸ™ƒ
  • -o outfile, --output-file=outfile β€” specify the output file outfile. πŸ’Ύ
  • -O origin, --origin=origin β€” when reporting archived metrics, start reporting at origin within the time window (see -S and -T). refer to PCPIntro(1) for a complete description of the syntax for origin. ⏱️
  • -r, --raw β€” output raw metric values, do not convert cumulative counters to rates. this option will override possible per-metric specifications. 🌢️
  • -R, --raw-prefer β€” like -r but this option will not override per-metric specifications. πŸ“
  • -s samples, --samples=samples β€” the samples argument defines the number of samples to be retrieved and reported. if samples is 0 or -s is not specified, pcp2arrow will sample and report continuously (in real time mode) or until the end of the set of PCP archives (in archive mode). see also -T. πŸ”
  • -S starttime, --start=starttime β€” when reporting archived metrics, the report will be restricted to those records logged at or after starttime. refer to PCPIntro(1) for a complete description of the syntax for starttime. ⏳
  • -t interval, --interval=interval β€” set the reporting interval to something other than the default 1 second. the interval argument follows the syntax described in PCPIntro(1), and in the simplest form may be an unsigned integer (the implied units in this case are seconds). see also the -T option. βŒ›
  • -T endtime, --finish=endtime β€” when reporting archived metrics, the report will be restricted to those records logged before or at endtime. refer to PCPIntro(1) for a complete description of the syntax for endtime.

when used to define the runtime before pcp2arrow will exit, if no samples is given (see -s) then the number of reported samples depends on interval (see -t). if samples is given then interval will be adjusted to allow reporting of samples during runtime. in case all of -T, -s, and -t are given, endtime determines the actual time pcp2arrow will run. no cap. ⏰

  • -v, --omit-flat β€” report only set-valued metrics with instances (e.g. disk.dev.read) and omit single-valued ``flat'' metrics without instances (e.g. kernel.all.sysfork). see -i and -I. πŸ“Š
  • -V, --version β€” display version number and exit. πŸ’œ
  • -z, --hostzone β€” use the local timezone of the host that is the source of the performance metrics, as identified by either the -h or the -a options. the default is to use the timezone of the local host. 🌍
  • -Z timezone, --timezone=timezone β€” use timezone for the date and time. Timezone is in the format of the environment variable TZ as described in environ(7). note that when including a timezone string in output, ISO 8601-style UTC offsets are used (so something like -Z EST+5 will become UTC-5). 🌐
  • -?, --help β€” display usage message and exit. πŸ†˜

🧚 FILES 🧚

  • pcp2arrow.conf β€” pcp2arrow configuration file (see -c) πŸ“
  • $PCP_SYSCONF_DIR/pmrep/*.conf β€” system provided default pmrep configuration files πŸ—ƒοΈ

🌈 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). πŸ”§

of particular note: PCP_DISCRETE_ONCE can be set to ensure that discrete metric values are reported only once, unless they change at some point. literally so handy. πŸ’–


πŸ’€ DEBUGGING OPTIONS πŸ’€

the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems, although 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), mkaf(1), pcp(1), pmcd(1), pminfo(1), pmrep(1), pmGetOptions(3), pmSpecLocalPMDA(3), LOGARCHIVE(5), pcp.conf(5), pmrep.conf(5), PMNS(5) and environ(7).


and that's the whole page, bestie β€” brought to you by Performance Co-Pilot, version PCP, and this lil manual page is literally titled PCP2ARROW(1). go forth and export some metrics. slay. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from