PMLOGREDUCE(1)

πŸ’– PMLOGREDUCE(1) πŸ’–

okay bestie, welcome to the General Commands Manual section of your life, because this one is literally called pmlogreduce and it's about to make your archives smaller in the time dimension. no cap. πŸ¦‹


✨ NAME ✨

pmlogreduce β€” temporal reduction of Performance Co-Pilot archives


πŸŽ€ SYNOPSIS πŸŽ€

pmlogreduce [-z?] [-A align] [-D debug] [-s samples] [-S starttime] [-t interval] [-T endtime] [-v volsamples] [-Z timezone] input output

πŸ’… DESCRIPTION πŸ’…

So pmlogreduce reads one set of Performance Co-Pilot (PCP) archives that you point at with input, and it creates a temporally reduced PCP archive in output. girl it's giving compression but make it chronological. πŸ”₯

input is a comma-separated list of names, and every single one of them may be either the base name of an archive or the name of a directory containing one or more archives. (yes, you can mix and match, she's flexible πŸ’)

The data reduction involves statistical and temporal reduction of samples, with an output sampling interval defined by the -t option in the output archive β€” and yes, that's independent of the sampling intervals in the input archives. The whole thing is further controlled by other command line arguments. πŸ‘‘

For some metrics, temporal data reduction is just not going to be helpful, periodt. So for metrics with types PM_TYPE_AGGREGATE or PM_TYPE_EVENT, a warning is issued if these metrics are found in input, and they will be skipped and will not appear in the output archive. sorry babes, they didn't make the cut πŸ’€


✨ OPTIONS ✨

The available command line options are:

  • -A align, --align=align β€” Specify a "natural" alignment of the output sample times; refer to PCPIntro(1). 🌸
  • -s samples, --samples=samples β€” The argument samples defines the number of samples to be written to output. If samples is 0 or -s is not specified, pmlogreduce will sample until the end of the set of PCP archives, or the end of the time window as specified by -T, whichever comes first. The -s option will override the -T option if it occurs sooner. ⏰
  • -S starttime, --start=starttime β€” Define the start of a time window to restrict the samples retrieved from the input archives; refer to PCPIntro(1).
  • -t interval, --interval=interval β€” Consecutive samples in the output archive will appear with a time delta defined by interval; refer to PCPIntro(1). Note the default value is 600 (seconds, i.e. 10 minutes). πŸ•™
  • -T endtime, --finish=endtime β€” Define the termination of a time window to restrict the samples retrieved from the input archives; refer to PCPIntro(1).
  • -v volsamples β€” The output archive is potentially a multi-volume data set, and the -v option causes pmlogreduce to start a new volume after volsamples records have been written to the output archive.
Independent of any -v option, each volume of an archive is limited to no more than 2^31 bytes, so pmlogreduce will automatically create a new volume for the archive before this limit is reached. she does NOT play about volume limits πŸ’…
  • -z, --hostzone β€” Use the local timezone of the host from the input archives when displaying the date and time, or interpreting the -S and -T options. The default is to initially use the timezone of the local host.
  • -Z timezone, --timezone=timezone β€” Use timezone when displaying the date and time, or interpreting the -S and -T options. Timezone is in the format of the environment variable TZ as described in environ(7).
  • -?, --help β€” Display usage message and exit.

🌈 DATA REDUCTION 🌈

The statistical and temporal reduction follows the following rules (get comfy, this is the main character section):

  1. Consecutive records from input are read without interpolation, and at most one output record is written for each interval, summarizing the performance data over that period. 🫢
  2. If the semantics of a metric indicates it is instantaneous or discrete, then the output value is computed as the arithmetic mean of the observations (if any) over each interval.
  3. If the semantics of a metric indicates it is a counter, then the following transformations are applied:
    1. Metrics with 32-bit precision are promoted to 64-bit precision.
    2. Any counter wrap (overflow) is noted, and appropriate adjustment made in the value of the metric over each interval. This will be correct in the case of a single counter wrap, but will silently underestimate in the case where more than one counter wrap occurs between consecutive observations in the input archives, and silently overestimate in the case where a counter reset occurs between consecutive observations in the input archives; unfortunately these situations cannot be detected, but are believed to be rare events for the sort of production monitoring environments where pmlogreduce is most likely to be deployed. 😭
  4. Any changes in instance domains, and indeed all metadata, is preserved. πŸŽ€
  5. Any "mark" records in the input archives (as created by pmlogextract(1)) will be preserved in the output archive, so periods where no data is available are maintained, and data interpolation will not occur across these periods when the output archive is subsequently processed with PCP applications. ✨

πŸ’€ CAVEATS πŸ’€

The preamble metrics (pmcd.pmlogger.archive, pmcd.pmlogger.host, and pmcd.pmlogger.port), which are automatically recorded by pmlogger at the start of the archive, may not be present in the archive output by pmlogreduce. These metrics are only relevant while the archive is being created, and have no significance once recording has finished.

so like, don't come for her if they ghost you, they were only ever here for the recording era πŸ™ˆ

πŸ“ DIAGNOSTICS πŸ“

All error conditions detected by pmlogreduce are reported on stderr with textual (if sometimes terse) explanation. ngl, sometimes terse is a personality trait.

Should the input archives be corrupted (this can happen if the pmlogger instance writing the archive suddenly dies 😡), then pmlogreduce will detect and report the position of the corruption in the file, and any subsequent information from the input archives will not be processed.

If any error is detected, pmlogreduce will exit with a non-zero status.


🧚 FILES 🧚

For each of the input and output archives, several physical files are used.

  • archive.meta β€” metadata (metric descriptions, instance domains, etc.) for the archive
  • archive.0 β€” initial volume of metrics values (subsequent volumes have suffixes 1, 2, ...) - for input these files may have been previously compressed with bzip2(1) or gzip(1) and thus may have an additional .bz2 or .gz suffix. πŸ¦‹
  • archive.index β€” temporal index to support rapid random access to the other files in the archive.

πŸ’œ 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).


πŸ”₯ 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.

Debugging options specific to pmlogger are as follows:

  • appl0 β€” initialization and time window
  • appl1 β€” report new metric-instance observations
  • appl2 β€” report scan start and end times, dump input and output records

⭐ SEE ALSO ⭐

PCPIntro(1), pmlc(1), pmlogdump(1), pmlogextract(1), pmlogger(1), pcp.conf(5) and pcp.env(5).


okay that's the whole page, you ATE that reading bestie πŸ‘‘βœ¨ this was brought to you by the lovely people at Performance Co-Pilot β€” that's the PCP source β€” and this lil manual page is dated PMLOGREDUCE(1), so go reduce some archives and slay the day away πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from