'\"macro stdmacro .\" .\" Copyright (c) 2016-2018 Red Hat. .\" Copyright (C) 2015-2019 Marko Myllynen .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; either version 2 of the License, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" .TH PMREP 1 "PCP" "Performance Co-Pilot" .SH NAME \f3pmrep\f1 \- performance metrics reporter .SH SYNOPSIS \fBpmrep\fP [\fB\-1235CdgGHIjkLnprRuUvVxz?\fP] [\fB\-4\fP \fIaction\fP] [\fB\-6\fP \fIsort-metric\fP] [\fB\-8\fP|\fB\-9\fP \fIlimit\fP] [\fB\-a\fP \fIarchive\fP] [\fB\-\-archive\-folio\fP \fIfolio\fP] [\fB\-A\fP \fIalign\fP] [\fB\-b\fP|\fB\-B\fP \fIspace-scale\fP] [\fB\-c\fP \fIconfig\fP] [\fB\-\-container\fP \fIcontainer\fP] [\fB\-\-daemonize\fP] [\fB\-e\fP \fIderived\fP] [\fB\-E\fP \fIlines\fP] [\fB\-f\fP \fIformat\fP] [\fB\-F\fP \fIoutfile\fP] [\fB\-h\fP \fIhost\fP] [\fB\-i\fP \fIinstances\fP] [\fB\-J\fP \fIrank\fP] [\fB\-K\fP \fIspec\fP] [\fB\-l\fP \fIdelimiter\fP] [\fB\-N\fP \fIpredicate\fP] [\fB\-o\fP \fIoutput\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-P\fP|\fB\-0\fP \fIprecision\fP] [\fB\-q\fP|\fB\-Q\fP \fIcount-scale\fP] [\fB\-s\fP \fIsamples\fP] [\fB\-S\fP \fIstarttime\fP] [\fB\-t\fP \fIinterval\fP] [\fB\-T\fP \fIendtime\fP] [\fB\-w\fP|\fB\-W\fP \fIwidth\fP] [\fB\-X\fP \fIlabel\fP] [\fB\-y\fP|\fB\-Y\fP \fItime-scale\fP] [\fB\-Z\fP \fItimezone\fP] \fImetricspec\fP \fI[...]\fP .SH DESCRIPTION .de EX .in +0.5i .ie t .ft CB .el .ft B .ie t .sp .5v .el .sp .ta \\w' 'u*8 .nf .. .de EE .fi .ie t .sp .5v .el .sp .ft R .in .. .B pmrep is a customizable performance metrics reporting tool. Any available performance metric, live or archived, system and/or application, can be selected for reporting using one of the output alternatives listed below together with applicable formatting options. .PP .B pmrep collects the selected metric values through the facilities of the Performance Co-Pilot (PCP), see .BR PCPIntro (1). The metrics to be reported are specified on the command line, in a configuration file, or both. Metrics can be automatically converted and scaled using the PCP facilities, either by default or by per-metric scaling specifications. In addition to the existing metrics, derived metrics can be defined using the arithmetic expressions described in .BR pmRegisterDerived (3). .PP Unless directed to another host by the .B \-h option, .B pmrep will contact the Performance Metrics Collector Daemon (PMCD, see .BR pmcd (1)) on the local host. .PP The .B \-a option causes .B pmrep to use the specified set of archive logs rather than connecting to a PMCD. The .B \-a and .B \-h options are mutually exclusive. .PP The .B \-L option causes .B pmrep to use a local context to collect metrics from DSO PMDAs (Performance Metrics Domain Agents, ``plugins'') on the local host without PMCD. Only some metrics are available in this mode. The .BR \-a , .BR \-h , and .B \-L options are mutually exclusive. .PP The metrics of interest are named in the .I metricspec argument(s). If a metricspec specifies a non-leaf node in the Performance Metrics Name Space (PMNS), then .B pmrep will recursively descend the PMNS and report on all leaf nodes (i.e., metrics) for that metricspec. (Use for example .BR pminfo (1) to list all the leaf nodes and their descriptions.) .PP A .I metricspec has three different forms. First, on the command line it can start with a colon (``:'') to indicate a .I metricset to be read from a .B pmrep configuration file (see .BR pmrep.conf (5)) which can then consist of any number of metricspecs. Second, a .I metricspec starting with non-colon specifies a PMNS node as described above, optionally followed by metric formatting definitions. This so-called .I compact form of a metricspec is defined as follows: .PP .in 0.5i .ft CW .nf metric[,label[,instances[,unit/scale[,type[,width[,precision[,limit]]]]]]] .fi .ft R .in .PP A valid PMNS node .RI ( metric ) is mandatory. It can be followed by a text .I label used by supporting output targets (currently: .IR stdout , see below). The optional .I instances definition restricts .I csv and .I stdout reporting to the specified instances (so non-matching instances will be filtered). An optional .I unit/scale is applicable for dimension-compatible, non-string metrics. (See below for supported .I unit/scale specifications.) By default, cumulative counter metrics are converted to rates, an optional .I type can be set to .B raw to disable this rate conversion. For supporting output targets (currently: .IR stdout ) a numeric .I width can be used to set the width of the output column for this metric. Too-wide numeric values for output will not be printed (apart from trailing decimals, numeric values will never be silently truncated). Too-wide strings will be truncated. Then, a metric-specific .I precision can be provided for numeric non-integer output values. Lastly, a metric-specific .I limit can be set for filtering numeric values per limit. .PP As a special case with metrics that are counters with time units (nanoseconds to hours), the .I unit/scale can be used to change the default reporting (for example, milliseconds / second) to normalize to the range zero to one by setting this to .B sec (see also .B \-y and .BR \-Y ). .PP The following .I metricspec requests the metric .B kernel.all.sysfork to be reported under the text label .BR forks , converting to the default rate count/s in an .B 8 wide column. Although the definitions in this .I compact form are optional, they must always be provided in the order specified above. .PP .in 1.5i .ft CW .nf kernel.all.sysfork,forks,,,,8 .fi .ft R .in .PP The third form of a metricspec, .IR "verbose form" , is described and valid only in .BR pmrep.conf (5). .PP Derived metrics are specified like PMNS leaf node metrics. .PP Options via environment values (see .BR pmGetOptions (3)) override the corresponding built-in default values (if any). Configuration file options override the corresponding environment variables (if any). Command line options override the corresponding configuration file options (if any). .SH OPTIONS The available command line options are: .TP 5 \fB\-0\fR \fIprecision\fR, \fB\-\-precision\-force\fR=\fIprecision\fR Like .B \-P but this option \fIwill\fP override per-metric specifications. .TP \fB\-1\fR, \fB\-\-dynamic\-header\fR Print a new dynamically adjusted header every time changes in availability of metric and instance values occur. By default a static header that never changes is printed once. See also .B \-E and .BR \-4 . .TP \fB\-2\fR, \fB\-\-overall\-rank\fR Perform overall ranking of instances in archive. By default ranking (see .BR \-J ) and reporting happens on each interval. With this option all instances and values are ranked before a summary is reported. See .BR pmlogsummary (1) for further archive summary reporting alternatives, including averages and peak times for values. .TP \fB\-3\fR, \fB\-\-overall\-rank\-alt\fR Like .B \-2 but print metric instances in \fBpmrep\fP \fImetricspec\fP format, to allow easily selecting the instances for further investigation. .TP \fB\-4\fR \fIaction\fR, \fB\-\-names\-change\fR=\fIaction\fR Specify which .I action to take on receiving a metric names change event during sampling. These events occur when a PMDA discovers new metrics sometime after starting up, and informs running client tools like .BR pmrep . Valid values for .I action are \fBupdate\fP (refresh metrics being sampled), \fBignore\fP (do nothing \- the default behaviour) and \fBabort\fP (exit the program if such an event happens). \fIupdate\fP implies \fB\-\-dynamic\-header\fP. .TP \fB\-5\fR, \fB\-\-ignore\-unknown\fR Silently ignore any metric name that cannot be resolved. At least one metric must be found for the tool to start. .TP \fB\-6\fR, \fB\-\-sort\-metric\fR=\fIsort-metric\fR Specify a sort reference metric to sort output by values with .BR \-X . By default sorting order is descending, prepending the metric name with the minus sign (``-'') will change the order to be ascending. See also .BR \-J " and " .BR \-N . .TP \fB\-8\fR \fIlimit\fR, \fB\-\-limit\-filter\fR=\fIlimit\fR Limit results to instances with values above/below .IR 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 \fInot\fP override possible per-metric specifications. See also .BR \-J " and " .BR \-N . .TP \fB\-9\fR \fIlimit\fR, \fB\-\-limit\-filter\-force\fR=\fIlimit\fR Like .B \-8 but this option \fIwill\fP override per-metric specifications. .TP \fB\-a\fR \fIarchive\fR, \fB\-\-archive\fR=\fIarchive\fR Performance metric values are retrieved from the set of Performance Co-Pilot (PCP) archive log files identified by the argument .IR 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. See also .BR \-u . .TP \fB\-\-archive\-folio\fR=\fIfolio\fR Read metric source archives from the PCP archive .I folio created by tools like .BR pmchart (1) or, less often, manually with .BR mkaf (1). .TP \fB\-A\fR \fIalign\fR, \fB\-\-align\fR=\fIalign\fR Force the initial sample to be aligned on the boundary of a natural time unit .IR align . Refer to .BR PCPIntro (1) for a complete description of the syntax for .IR align . .TP \fB\-b\fR \fIscale\fR, \fB\-\-space\-scale\fR=\fIscale\fR .I Unit/scale for space (byte) metrics, possible values include .BR bytes , .BR Kbytes , .BR KB , .BR Mbytes , .BR MB , and so forth. This option will \fInot\fP override possible per-metric specifications. See also .BR pmParseUnitsStr (3). .TP \fB\-B\fR \fIscale\fR, \fB\-\-space\-scale\-force\fR=\fIscale\fR Like .B \-b but this option \fIwill\fP override per-metric specifications. .TP \fB\-c\fR \fIconfig\fR, \fB\-\-config\fR=\fIconfig\fR Specify the .I config file to use. The default is the first found of: .BR ./pmrep.conf , .BR $HOME/.pmrep.conf , .BR $HOME/pcp/pmrep.conf , and .BR $PCP_SYSCONF_DIR/pmrep/pmrep.conf . See .BR pmrep.conf (5). .TP \fB\-\-container\fR=\fIcontainer\fR Fetch performance metrics from the specified .IR container , either local or remote (see .BR \-h ). .TP \fB\-C\fR, \fB\-\-check\fR Exit before reporting any values, but after parsing the configuration and metrics and printing possible headers. .TP \fB\-d\fR, \fB\-\-delay\fR When replaying from an archive, this option requests that the prevailing real-time delay be applied between samples (see .BR \-t ) to effect a pause, rather than the default behaviour of replaying at full speed. .TP .B \-\-daemonize Daemonize on startup. .TP \fB\-e\fR \fIderived\fR, \fB\-\-derived\fR=\fIderived\fR Specify .I derived performance metrics. If .I derived starts with a slash (``/'') or with a dot (``.'') it will be interpreted as a derived metrics configuration file, otherwise it will be interpreted as comma- or semicolon-separated derived metric expressions. For details see .BR pmLoadDerivedConfig (3) and .BR pmRegisterDerived (3). .TP \fB\-E\fR \fIlines\fR, \fB\-\-repeat\-header\fR=\fIlines\fR Repeat the header every .I lines of output. See also .BR \-1 . .TP \fB\-f\fR \fIformat\fR, \fB\-\-timestamp\-format\fR=\fIformat\fR Use the .I format string for formatting the timestamp. The format will be used with Python's .B datetime.strftime method which is mostly the same as that described in .BR strftime (3). An empty .I format string (i.e., "") will remove the timestamps from the output. Defaults to .B %H:%M:%S when using the .I stdout output target. Defaults to .B "%Y-%m-%d %H:%M:%S" when using the .I csv output target. .TP \fB\-F\fR \fIoutfile\fR, \fB\-\-output\-file\fR=\fIoutfile\fR Specify the output file .IR outfile . See .BR \-o . .TP \fB\-g\fR, \fB\-\-separate\-header\fR Output the column number and complete metric information, one-per-line, before printing the metric values. .TP \fB\-G\fR, \fB\-\-no\-globals\fR Do not include global metrics in reporting (see .BR pmrep.conf (5)). .TP \fB\-h\fR \fIhost\fR, \fB\-\-host\fR=\fIhost\fR Fetch performance metrics from .BR pmcd (1) on .IR host , rather than from the default localhost. .TP \fB\-H\fR, \fB\-\-no\-header\fR Do not print any headers. .TP \fB\-i\fR \fIinstances\fR, \fB\-\-instances\fR=\fIinstances\fR Report only the listed .I instances from current instances (if present, see also .BR \-j ). By default all current instances are reported, except when writing an archive (see .BR \-o ) when all instances, present and future, are reported. This is a global option that is used for all metrics unless a metric-specific instance definition is provided as part of a .IR metricspec . By default single-valued ``flat'' metrics without multiple instances are still reported as usual, use .B \-v to change this. .RS .PP The list may consist of one or more comma-separated instances. The instance name may be quoted with single (') or double (") quotes for those cases where the instance name contains commas or whitespace. Note that on the command line when specifying more than one instance, all the names must be quoted. .PP Multiple .B \-i options are allowed as an alternative way of specifying more than one instance of interest. Regular expressions can also be used. .PP As an example, the following would report the same instances: .EX $ pmrep \-i "'1 minute','5 minute'" kernel.all.load $ pmrep \-i '"1 minute","5 minute"' kernel.all.load $ pmrep \-i "'1 minute'" \-i "'5 minute'" kernel.all.load $ pmrep kernel.all.load,,"'1 minute','5 minute'" $ pmrep kernel.all.load,,'"1 minute","5 minute"' .EE .PP However, this would report only the 1-minute instance: .EX $ pmrep \-i '"1 minute","5 minute"' kernel.all.load,,"1 minute" .EE .PP But this would report all instances (due to per-metric override): .EX $ pmrep \-i '"1 minute","5 minute"' 'kernel.all.load,,.*' .EE .RE .TP \fB\-I\fR, \fB\-\-ignore\-incompat\fR Ignore incompatible metrics. By default incompatible metrics (that is, their type is unsupported or they cannot be scaled as requested) will cause .B pmrep to terminate with an error message. With this option all incompatible metrics are silently omitted from reporting. This may be especially useful when requesting non-leaf nodes of the PMNS tree for reporting. .TP \fB\-j\fR, \fB\-\-live\-filter\fR Perform instance live filtering. This allows capturing all filtered instances even if processes are restarted at some point (unlike without live filtering). Performing live filtering over a huge amount of instances will add some internal overhead so a bit of user caution is advised. See also .BR \-1 " and " .BR \-n . .TP \fB\-J\fR \fIrank\fR, \fB\-\-rank\fR=\fIrank\fR Limit results to highest/lowest .I rank 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. See also .BR \-2 , .BR \-6 " and " .BR \-8 . .TP \fB\-k\fR, \fB\-\-extended\-csv\fR Write extended CSV output, similar to .BR sadf (1). .TP \fB\-K\fR \fIspec\fR, \fB\-\-spec\-local\fR=\fIspec\fR When fetching metrics from a local context (see .BR \-L ), the .B \-K option may be used to control the DSO PMDAs that should be made accessible. The .I spec argument conforms to the syntax described in .BR pmSpecLocalPMDA (3). More than one .B \-K option may be used. .TP \fB\-l\fR \fIdelimiter\fR, \fB\-\-delimiter\fR=\fIdelimiter\fR Specify the .I delimiter that separates each column of .I csv or .I stdout output. The default for .I stdout is two spaces (`` '') and comma (``,'') for .IR csv . In case of CSV output or stdout output with non-whitespace delimiter, any instances of the delimiter in string values will be replaced by the underscore (``_'') character. .TP \fB\-L\fR, \fB\-\-local\-PMDA\fR Use a local context to collect metrics from DSO PMDAs on the local host without PMCD. See also .BR \-K . .TP \fB\-n\fR, \fB\-\-invert\-filter\fR Perform ranking before live filtering. By default instance live filtering (when requested, see .BR \-j ) happens before instance ranking (when requested, see .BR \-J ). With this option the logic is inverted and ranking happens before live filtering. .TP \fB\-N\fR \fIpredicate\fR, \fB\-\-predicate\fR=\fIpredicate\fR Specify a comma-separated list of .I predicate filter reference metrics. By default ranking (see .BR \-J ) happens for each metric individually. With predicates, ranking is done only for the specified predicate metrics. When reporting, rest of the metrics sharing the same .I instance domain (see .BR PCPIntro (1)) as the predicate will include only the highest/lowest ranking instances of the corresponding predicate. .RS .PP So for example, using \fBproc.memory.rss\fP (resident memory size of process) as the .I predicate metric together with \fBproc.io.total_bytes\fP and \fBmem.util.used\fP as metrics to be reported, only the processes using most/least (as per .BR \-J ) memory will be included when reporting total bytes written by processes. Since \fBmem.util.used\fP is a single-valued metric (thus not sharing the same instance domain as the process-related metrics), it will be reported as usual. .RE .TP \fB\-o\fR \fIoutput\fR, \fB\-\-output\fR=\fIoutput\fR Use .I output target for reporting. The default target is .IR stdout . The available target alternatives are: .RS .TP 2 .I archive Record metrics into a PCP archive which can later be replayed with PCP tools, including .B pmrep itself. See .BR LOGARCHIVE (5) and .BR PCPIntro (1) for details about PCP archive files. Requires .BR \-F . .TP .I csv Print metrics in CSV format (subject to formatting options). .TP .I stdout Print metrics to stdout (format subject to formatting options). .RE .TP \fB\-O\fR \fIorigin\fR, \fB\-\-origin\fR=\fIorigin\fR When reporting archived metrics, start reporting at .I origin within the time window (see .B \-S and .BR \-T ). Refer to .BR PCPIntro (1) for a complete description of the syntax for .IR origin . .TP \fB\-p\fR, \fB\-\-timestamps\fR Print timestamps. By default no timestamps are printed. .TP \fB\-P\fR \fIprecision\fR, \fB\-\-precision\fR=\fIprecision\fR Use .I precision for numeric non-integer output values. If the value is too wide for its column width, .I precision is reduced one by one until the value fits, or not printed at all if it does not. The default is to use 3 decimal places (when applicable). This option will \fInot\fP override possible per-metric specifications. .TP \fB\-q\fR \fIscale\fR, \fB\-\-count\-scale\fR=\fIscale\fR .I Unit/scale for count metrics, possible values include .BR "count x 10^\-1" , .BR "count" , .BR "count x 10" , .BR "count x 10^2" , and so forth from .B 10^\-8 to .BR 10^7 . .\" https://bugzilla.redhat.com/show_bug.cgi?id=1264124 (These values are currently space-sensitive.) This option will \fInot\fP override possible per-metric specifications. See also .BR pmParseUnitsStr (3). .TP \fB\-Q\fR \fIscale\fR, \fB\-\-count\-scale\-force\fR=\fIscale\fR Like .B \-q but this option \fIwill\fP override per-metric specifications. .TP \fB\-r\fR, \fB\-\-raw\fR Output raw metric values, do not convert cumulative counters to rates. When writing archives, raw values are always used. This option \fIwill\fP override possible per-metric specifications. .TP \fB\-R\fR, \fB\-\-raw\-prefer\fR Like .B \-r but this option will \fInot\fP override per-metric specifications. .TP \fB\-s\fR \fIsamples\fR, \fB\-\-samples\fR=\fIsamples\fR The argument .I samples defines the number of samples to be retrieved and reported. If .I samples is 0 or .B \-s is not specified, .B pmrep will sample and report continuously (in real time mode) or until the end of the set of PCP archives (in archive mode). See also .BR \-T . .TP \fB\-S\fR \fIstarttime\fR, \fB\-\-start\fR=\fIstarttime\fR When reporting archived metrics, the report will be restricted to those records logged at or after .IR starttime . Refer to .BR PCPIntro (1) for a complete description of the syntax for .IR starttime . .TP \fB\-t\fR \fIinterval\fR, \fB\-\-interval\fR=\fIinterval\fR The default update .I interval may be set to something other than the default 1 second. The .I interval argument follows the syntax described in .BR PCPIntro (1), and in the simplest form may be an unsigned integer (the implied units in this case are seconds). See also the .B \-T and .B \-u options. .TP \fB\-T\fR \fIendtime\fR, \fB\-\-finish\fR=\fIendtime\fR When reporting archived metrics, the report will be restricted to those records logged before or at .IR endtime . Refer to .BR PCPIntro (1) for a complete description of the syntax for .IR endtime . .RS .PP When used to define the runtime before \fBpmrep\fP will exit, if no \fIsamples\fP is given (see \fB\-s\fP) then the number of reported samples depends on \fIinterval\fP (see \fB\-t\fP). If .I samples is given then .I interval will be adjusted to allow reporting of .I samples during runtime. In case all of .BR \-T , .BR \-s , and .B \-t are given, .I endtime determines the actual time .B pmrep will run. .RE .TP \fB\-u\fR, \fB\-\-no\-interpol\fR When reporting archived metrics, by default values are reported according to the selected sample interval (\c .B \-t option), not according to the actual record interval in an archive. To this effect PCP interpolates the values to be reported based on the records in the archive. With the .B \-u option uninterpolated reporting is enabled, every recorded value for the selected metrics is reported and the requested sample interval (\c .BR \-t ) is ignored. .RS .PP So for example, if a PCP archive contains recorded values for every 10 seconds and the requested sample interval is 1 hour, by default .B pmrep will use an interpolation scheme to compute the values of the requested metrics from the values recorded in the proximity of these requested metrics and values for every 1 hour are reported. With .B \-u every record every 10 seconds are reported as such (the reported values are still subject to rate conversion, use .B \-r or .B \-R to disable). .RE .TP \fB\-U\fR, \fB\-\-no\-unit\-info\fR Omit unit information from headers. .TP \fB\-v\fR, \fB\-\-omit\-flat\fR Omit single-valued ``flat'' metrics from reporting, only consider set-valued metrics (i.e., metrics with multiple values) for reporting. See .B \-i and .BR \-I . .TP \fB\-V\fR, \fB\-\-version\fR Display version number and exit. .TP \fB\-w\fR \fIwidth\fR, \fB\-\-width\fR=\fIwidth\fR Set the .I stdout output column .IR width . Strings will be truncated to this width. The default .I width is the shortest that can fit the metric text label, the forced minimum is 3. This option will \fInot\fP override possible per-metric specifications. .TP \fB\-W\fR \fIwidth\fR, \fB\-\-width\-force\fR=\fIwidth\fR Like .B \-w but this option \fIwill\fP override per-metric specifications. .TP \fB\-x\fR, \fB\-\-extended\-header\fR Print extended header. .TP \fB\-X\fR \fIlabel\fR, \fB\-\-colxrow\fR=\fIlabel\fR Swap columns and rows in \fIstdout\fP output, reporting one instance per line, using \fIlabel\fP as the text label for instance column (set to an empty string \fB""\fP to enable swapping without a specific text label). This is convenient to allow easily using .BR grep (1) to filter results or to more closely mimic other utilities. See also .BR \-i " and " .BR \-6 . .TP \fB\-y\fR \fIscale\fR, \fB\-\-time\-scale\fR=\fIscale\fR .I Unit/scale for time metrics, possible values include .BR nanosec , .BR ns , .BR microsec , .BR us , .BR millisec , .BR ms , and so forth up to .BR hour , .BR hr . This option will \fInot\fP override possible per-metric specifications. See also .BR pmParseUnitsStr (3). .TP \fB\-Y\fR \fIscale\fR, \fB\-\-time\-scale\-force\fR=\fIscale\fR Like .B \-y but this option \fIwill\fP override per-metric specifications. .TP \fB\-z\fR, \fB\-\-hostzone\fR Use the local timezone of the host that is the source of the performance metrics, as identified by either the .B \-h or the .B \-a options. The default is to use the timezone of the local host. .TP \fB\-Z\fR \fItimezone\fR, \fB\-\-timezone\fR=\fItimezone\fR Use .I timezone for the date and time. .I Timezone is in the format of the environment variable .B TZ as described in .BR 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). .TP \fB\-?\fR, \fB\-\-help\fR Display usage message and exit. .SH EXAMPLES The following examples use the standard PCP facilities for collecting the metric values, no external utilities are needed. The referenced colon-starting .I metricsets are part of the system \fBpmrep.conf\fP file. .PP Display network interface metrics on the local host: .RS +4 .ft B .nf $ pmrep network.interface.total.bytes .fi .ft P .RE .PP Display all outgoing network metrics for the .I wlan0 interface: .RS +4 .ft B .nf $ pmrep \-i wlan0 \-v network.interface.out .fi .ft P .RE .PP Display timestamped .BR vmstat (8) like information using megabytes instead of kilobytes and also include the number of inodes used (tab completes available metrics and after a colon metricsets with bash and zsh): .RS +4 .ft B .nf $ pmrep \-p \-B MB :vmstat vfs.inodes.count .fi .ft P .RE .PP Display per-device disk reads and writes from the host .I server1 using two seconds interval and .BR sadf (1) like CSV output format: .RS +4 .ft B .nf $ pmrep \-h server1 \-t 2s \-o csv \-k disk.dev.read disk.dev.write .fi .ft P .RE .PP Display processes using at least 100MB of memory using dynamic headers: .RS +4 .ft B .nf $ pmrep \-b MB \-\-limit\-filter 100 \-\-dynamic\-header proc.memory.rss .fi .ft P .RE .PP Display the predefined set of metrics from the default .BR pmrep.conf (5) containing information about I/O issued by current .IR firefox " process(es):" .RS +4 .ft B .nf $ pmrep \-i '.*firefox.*' :proc-io .fi .ft P .RE .PP Display the three most CPU-using processes: .RS +4 .ft B .nf $ pmrep \-1gUJ 3 proc.hog.cpu .fi .ft P .RE .PP Display .B sar \-w and .B sar \-W like information at the same time from the PCP archive .I ./20150921.09.13 showing values recorded between 3 - 5 PM: .RS +4 .ft B .nf $ pmrep \-a ./20150921.09.13 \-S @15:00 \-T @17:00 :sar\-w :sar\-W .fi .ft P .RE .PP Record most relevant CPU, memory, and I/O related information about every Java process on the system, present and future, to an archive .I ./a on one minute interval at every full minute in a background process: .RS +4 .ft B .nf $ pmrep \-\-daemonize \-A 1m \-t 1m \-i '.*java.*' \-j \-o archive \-F ./a \\ :proc-info :proc-cpu :proc-mem :proc-io .fi .ft P .RE .PP Record all 389 Directory Server, XFS file system, and CPU/memory/disk metrics every five seconds for five minutes to a PCP archive .IR ./a : .RS +1 .ft B .nf $ pmrep \-t 5s \-T 5m \-o archive \-F ./a ds389 xfs kernel.all.cpu mem disk .fi .ft P .RE .PP Record process memory and I/O information for those processes which are the three most memory-consuming processes: .RS +1 .ft B .nf $ pmrep \-o archive \-F ./a \-J 3 \-N proc.memory.rss proc.memory proc.io .fi .ft P .RE .SH FILES .TP .I pmrep.conf \fBpmrep\fP configuration file (see \fB\-c\fP) .TP .I \f(CW$PCP_SYSCONF_DIR\fP/pmrep/pmrep.conf system provided \fBpmrep\fP configuration file .SH PCP ENVIRONMENT Environment variables with the prefix \fBPCP_\fP are used to parameterize the file and directory names used by PCP. On each installation, the file \fB/etc/pcp.conf\fP contains the local values for these variables. The \fB$PCP_CONF\fP variable may be used to specify an alternative configuration file, as described in \fBpcp.conf\fP(5). .PP For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). .SH SEE ALSO .BR mkaf (1), .BR PCPIntro (1), .BR pcp (1), .BR pcp-atop (1), .BR pcp2elasticsearch (1), .BR pcp2graphite (1), .BR pcp2influxdb (1), .BR pcp2json (1), .BR pcp2spark (1), .BR pcp2xlsx (1), .BR pcp2xml (1), .BR pcp2zabbix (1), .BR pmcd (1), .BR pmchart (1), .BR pmcollectl (1), .BR pmdiff (1), .BR pmdumplog (1), .BR pmdumptext (1), .BR pminfo (1), .BR pmiostat (1), .BR pmlogextract (1), .BR pmlogsummary (1), .BR pmprobe (1), .BR pmstat (1), .BR pmval (1), .BR sadf (1), .BR sar (1), .BR pmGetOptions (3), .BR pmSpecLocalPMDA (3), .BR pmLoadDerivedConfig (3), .BR pmParseUnitsStr (3), .BR pmRegisterDerived (3), .BR strftime (3), .BR LOGARCHIVE (5), .BR pcp.conf (5), .BR pmns (5), .BR pmrep.conf (5), .BR environ (7) and .BR vmstat (8).