PMDUMPTEXT(1)
๐ธ pmdumptext โ the Gen Z field guide ๐
okay bestie, listen up: this is pmdumptext from the General Commands Manual, section 1. it dumps performance metrics into an ASCII table and honestly? it's giving spreadsheet but make it โจobservabilityโจ. let's go ๐ฆ
โจ NAME โจ
pmdumptext โ dump performance metrics to an ASCII table ๐
โจ SYNOPSIS โจ
pmdumptext [-CFGHilmMNoruVXz?] [-a archive] [-A align] [-c config] [-d
delimiter] [-D debug] [-f format] [-h host] [-n pmnsfile] [-O offset]
[-P precision] [-R lines] [-s sample] [-S starttime] [-t interval] [-T
endtime] [-U string] [-w width] [-Z timezone] [metric ...]
โจ DESCRIPTION โจ
so pmdumptext outputs the values of performance metrics โ either collected live, or pulled out of a set of Performance Co-Pilot (PCP) archives. by default, the metric values show up in tab separated columns, with a timestamp sitting in front of them like a little name tag ๐ซถ
unless you point it somewhere else with the -h option, or at one or more sets of archives with the -a option, or you slap an explicit host: or archive/ prefix on the metric itself (more on that below, iykyk), pmdumptext will go talk to the Performance Metrics Collector Daemon (PMCD) on the local host to get everything it needs. no cap ๐
pmdumptext can also run in interactive mode with the -i option, which displays the values in equal width columns (so pretty, so aligned ๐). without that option, it makes zero attempt to line anything up โ which is lowkey the whole point, because it means other applications can parse the output easily. iconic behaviour honestly.
you can control the output format even more: change the precision of the values with -P, change the width of the columns with -w, and change the format of the values with the -G and -F options โ those give you the shortest of scientific-or-fixed digits, and a fixed width format, respectively. chef's kiss ๐
by default pmdumptext will scale metric values to "canonical" units of bytes, seconds and counts. the one exception is with the -r option, where the values are not scaled. and the -u option reports the units of each metric, which is so helpful of it โญ
the metrics to be dumped can be:
- listed on the command line,
- put in a config file, or
- piped to
pmdumptexton stdin.
a metric consists of an optional source (host or archive), the metric name, and an optional instance list immediately after the name. a colon separates a host name from the metric, and a forward slash (/) separates an archive name from the metric. instances go inside square brackets, and a comma goes between each instance if you're listing more than one. for example, some legal metrics are:
kernel.all.cpu.idle
myhost:kernel.all.cpu.idle[cpu0,cpu3]
/path/to/myarchive/kernel.all.cpu.idle[cpu1]
when a metric doesn't have a host: or archive/ prefix โ like kernel.all.cpu.idle up there ๐ โ then the source of the metric gets decided by these rules, in order:
(a) PMCD on host from the -h option if any, else (b) the archive from the first -a option if any, else (c) the host from the first metric prior to this one with a host: prefix if any, else (d) the archive from the first metric prior to this one with an archive/ prefix if any, else (e) PMCD on the local host, which is equivalent to local::metric.
the format of a metric is described even further in PCPIntro(1), in the PERFORMANCE METRIC SPECIFICATIONS section. go read it, bestie, it's a whole vibe ๐
a normalization value may optionally follow a metric name in a config file or on stdin. the metric value will be scaled by this value. for example, if the file system /dev/root has a capacity of 1965437 bytes, then the percentage of the file system that is used could be dumped with this config:
filesys.used[/dev/root] 19654.37
โ ๏ธ heads up: a normalization value may not be used with metrics specified as command line arguments. periodt.
a metric name is not required to be a leaf node in the Performance Metrics Name Space (PMNS) โ except when one or more instances are specified. for example, to dump all file system metrics, only filesys is required to dump filesys.capacity, filesys.used, filesys.free etc. she's efficient like that ๐
โจ OPTIONS โจ
the command line options -A (or --align), -O (or --origin), -S (or --start) and -T (or --finish) control the alignment, offset, start and end time when visualizing metrics from archives. these options are common to most Performance Co-Pilot tools and are fully described in PCPIntro(1). ๐ซถ
the other available options are:
-aarchive,--archive=archive โ specifies the historical archive from which metrics can be obtained for a particular host. archive is the full path to an individual archive file, or the name of a directory containing archives, or the basename of an archive โ all previously created bypmlogger(1). multiple sets of archives (separated by commas or in different-aoptions) from different hosts may be given, but only one set of archives per host is permitted. any metrics that are not associated with a specific host or archive will use the first archive as their source. ๐-cconfig,--config=config โ if no metrics are listed on the command line, a config file can be used to specify the metrics to be dumped. unlike the command line metrics, each metric may be followed by a normalization value. empty lines and lines that begin with#are ignored. โจ-C,--checkโ exit before dumping any values, but after parsing the metrics. metrics, instances, normals and units are listed if-m,-l,-Nand/or-uare specified. a little sneak preview, no data spilled ๐-ddelimiter,--delimiter=delimiter โ specify the delimiter that separates each column of output. the delimiter may only be a single character. one. character. that's the rule ๐-fformat,--time-format=format โ use the format string for formatting the timestamp with each set of values. the syntax of this string is the same as that described instrftime(3). an empty format string (e.g.'') will remove the timestamps from the output. bye bye timestamps ๐-F,--fixedโ output the values in a fixed width format of 6 characters. positive numbers are represented asdd.dduand negative numbers as[-]d.ddu. the postfix multiplier may have the valuesK(10^3),M(10^6),G(10^9) andT(10^12). for example,4567would be displayed as4.57K, even if the units of the metric are bytes. math girlie behaviour ๐งฎ-G,--scientificโ output the values using the shortest of a scientific format or a decimal notation. glow up ๐ฅ-hhost,--host=host โ fetch performance metrics frompmcd(1)on host, rather than the defaultlocalhost. go visit, bestie ๐-H,--headersโ show all headers before dumping any metric values. this is equivalent to-lmNu. the full fit-check before the show ๐ธ-i,--interactiveโ output the data in fixed width columns using fixed width values (see-F) so that it is human-readable. this option may not be used with-Pas fixed point values are not fixed width. this option will also affect the output of-mand-uoptions, as the metric, instance and unit names will be truncated. โ๏ธ-l,--sourceโ show the source of the metrics. in interactive mode, the host of the metrics is shown. in non-interactive mode, this option shows the source of the metrics with the metric name even if-mis not specified. ๐-m,--metricsโ output the metric names before the metric values. the source and units of the metrics may also be dumped with the-land-uoptions respectively. if in interactive mode, the metrics names may be truncated, and the instance names, where relevant, are also truncated on the follow line. ๐-Mโ output the column number and complete metric names before dumping any values. if the-lflag is also specified, the source of the metrics is also shown. numbered like a ranked list, iconic ๐-npmnsfile,--namespace=pmnsfile โ load an alternative local PMNS from the file pmnsfile. ๐๏ธ-o,--offsetโ when a timestamp is being reported (i.e. unless an empty format string is given with the-foption), the timestamp is prefixed with the offset in seconds from the start of the set of archives or the beginning of the execution ofpmdumptext. โฑ๏ธ-Nโ output the normalization factors before the metric values. ๐-pprecision,--precision=precision โ set the precision of the values. this option may not be used with-Fas the precision is constant. the default precision is 3. ๐ฏ-r,--rawโ output the raw metric values, do not convert counters to rates and do not scale values to "canonical" units. this option also causespmdumptextto ignore the normalization values for each metric. raw and unfiltered, we love that ๐-Rlines,--repeat=lines โ repeat the header every lines of output. this option is useful in interactive mode when using a graphical window to avoid the header scrolling beyond the window's buffer, and to realign the header if the window is resized. very considerate of her ๐ช-ssamples,--samples=samples โpmdumptextwill terminate after this many samples. that's a wrap โจ-tinterval,--interval=interval โ the interval option follows the syntax described inPCPIntro(1), and in the simplest form may be an unsigned integer (the implied units in this case are seconds). the default interval is 1 second. tick tock ๐ฐ๏ธ-u,--unitsโ output the units of the metrics before the first values, but after the metric names if-mis also specified. ๐-Ustring,--unavailable=string โ change the output when values are unavailable to string. the default string is?. so when the data ghosts you, you get to choose the excuse ๐-V,--versionโ display version number and exit. ๐-wwidth,--widthfR=width โ set the column width of the output. strings will be truncated to this width, and maybe postfixed by...if the width is greater than 5. ๐-X,--extendedโ output the column number and complete metric names, one-per-line, both before dumping the first set of values and again each time the header is repeated. she's thorough ๐-z,--hostzoneโ use the local timezone of the host that is the source of the performance metrics, as identified by either the-hor the first-aoptions. the default is to use the timezone of the local host. ๐-Ztimezone,--timezone=timezone โ use timezone for the date and time. timezone is in the format of the environment variableTZas described inenviron(7). ๐-?,--helpโ display usage message and exit. help a girl out ๐ซถ
โจ MULTIPLE SOURCES โจ
pmdumptext supports the dumping of metrics from multiple hosts or sets of archives. the metrics listed on the command line or in the config file may have no specific source, or come from different sources. mixing and matching, we love to see it ๐
however, restrictions apply when archives are specified on the command line (-a) and/or in the configuration file:
- there may be only one set of archives for any one host.
- the hosts of any metrics with host sources must correspond to the host of a set of archives โ either on the command line or previously as the source of another metric.
โ ๏ธ the options-aand-hmay not be used together. pick a lane, bestie ๐ญ
๐ UNIT CONVERSION ๐
Okay bestie, this part is kinda the glow-up phase. Every metric that has the semantics of a counter gets automatically converted to rates over the sample time interval. That's just how it works, no asking, it's automatic. ๐
And in interactive mode, pmdumptext is even extra and changes the units on some metrics so your human brain can actually process them:
- All metrics with space units (bytes all the way up to terabytes) get scaled to bytes. And heads up โ this is the iconic detail โ 1024 bytes is represented as
1.02K, NOT1.00K. Yes, really. That's not a typo, that's just the vibe. ๐ซถ - Metrics that are counters with time units (nanoseconds through hours) represent time utilization over the sample interval. The unit strings of those metrics get changed to
Time Utilization, or abbreviated toutilif you're being casual, and the values are normalized to the range zero to one. Clean. Tidy. Slay. โจ
๐ธ EXAMPLES ๐ธ
Not me giving you actual receipts of this tool in the wild. Study them, they're giving main character energy. ๐
1. Say you wanna examine the load on two hosts, foo and bar, at the same time:
$ pmdumptext -il 'foo:kernel.all.load[1]' 'bar:kernel.all.load[1]'
Source foo bar
Wed Jul 30 11:37:53 0.309 0.409
Wed Jul 30 11:37:54 0.309 0.409
Wed Jul 30 11:37:55 0.309 0.409
2. Wanna output the memory utilization on a remote host called bong, but with a simpler timestamp? Say less:
$ pmdumptext -imu -h bong -f '%H:%M:%S' mem.util
Metric kernel fs_ctl _dirty _clean free user
Units b b b b b b
09:32:28 8.98M 0.97M 0.00 3.90M 7.13M 46.13M
09:32:29 8.99M 0.98M 0.00 5.71M 5.39M 46.03M
09:32:30 8.99M 1.07M 0.00 5.81M 4.55M 46.69M
09:32:31 9.03M 1.16M 0.00 6.45M 3.48M 47.00M
09:32:32 9.09M 1.18M 20.48K 6.23M 3.29M 47.30M
3. And if you want to dump all metrics collected in an archive, at a 30 second interval, into a file so another tool can chew on it:
$ pminfo -a archive | pmdumptext -t 30s -m -a archive > outfile
It's giving pipeline. It's giving delegation. We love a tool that plays well with others. ๐ฆ
๐ FILES ๐
$PCP_VAR_DIR/pmns/*โ the default PMNS specification files. The originals. The blueprint files. ๐๏ธ
๐ PCP ENVIRONMENT ๐
So here's the tea on config, bestie. Environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. Every single installation has a file at /etc/pcp.conf that holds the local values for all these variables. ๐
And if you want to be different (respect), the $PCP_CONF variable can be used to specify an alternative configuration file, exactly as described in pcp.conf(5).
Also, for environment variables that affect PCP tools generally (not just this one), go look at pmGetOptions(3). iykyk. ๐ง
๐ DEBUGGING OPTIONS ๐
The -D or --debug option turns on additional diagnostics on stderr to help triage problems. Lowkey though? That info is sometimes cryptic, and it's primarily intended to give guidance for developers rather than for end-users. So if you're just vibing as a normal user, you might be reading straight-up riddles. ๐ญ
debug is a comma separated list of debugging options. And listen โ to get the list of available debugging options and what they mean, use pmdbg(1) with the -l option. That's your cheat sheet. ๐
The debugging options specific to pmdumptext are as follows:
appl0โ detailed diagnostics for metrics, their source and timezone, metadata, units normalization, output format, etc. Basically the whole backstage tour. โจ
๐ SEE ALSO ๐
PCPIntro(1), pmcd(1), pmchart(1), pmlogger(1), pmrep(1), PMAPI(3), strftime(3) and environ(7).
Go read them. All of them. Not optional, bestie. ๐๐
And that's the whole page, periodt. This one came to you courtesy of Performance Co-Pilot, filed under PMDUMPTEXT(1) โ and ngl, there's no date stamped on this footer, so we're just gonna say iconic and timeless. ๐โจ๐๐ฆ๐ธ
๐ฆ where this page comes from
- arch rolling: pcp 7.2.2-2 ยท GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 ยท GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 ยท GPL-2.0-or-later AND CC-BY-3.0
- ubuntu stonking: pcp-gui 7.2.1-2build1
- Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms