PMSTAT(1)
PMSTAT(1) π the pcp-vmstat, pmstat glow-up
okay bestie, this is the General Commands Manual page for PMSTAT(1) and lemme tell you, it's a whole vibe check for your system. pull up a chair πͺ
β¨ NAME β¨
pcp-vmstat, pmstat β high-level system performance overview π«Ά
β¨ SYNOPSIS β¨
pcp [pcp options] vmstat [interval [samples]]
pmstat [-gLlPVxz?] [-a archive] [-A align] [-D debug] [-h host] [-H
file] [-n pmnsfile] [-O offset] [-p port] [-s samples] [-S starttime]
[-t interval] [-T endtime] [-Z timezone]
pcp-vmstat ...
β¨ DESCRIPTION β¨
so pmstat gives you a one line summary of how your system is doing, every interval unit of time (default is 5 seconds). it's giving "top-level tea only" β β pmstat is made to watch system performance at the highest level, and then once you spot something sus, you go grab the other tools to dig into the subsystems where the potential performance problems might be lurking. iykyk π
pcp-vmstat is literally just a cute lil wrapper for use with the pcp(1) command, giving a more familiar command line format for some users. it also turns on the extended reporting option by default, peep the -x option below π
you can monitor multiple hosts by supplying more than one host with multiple -h flags (that's for live monitoring), or by giving a name of the hostlist file with -H where each line contains one host name, or with multiple -a flags (that's retrospective monitoring from sets of archives). so many options, so much power π
by default, pmstat fetches metrics by connecting to the Performance Metrics Collector Daemon (PMCD) on the local host. if you specify the -L option, then pmcd(1) gets bypassed entirely, and metrics are fetched from PMDAs on the local host using the stand-alone PM_CONTEXT_LOCAL variant of pmNewContext(3). when you specify the -h option, pmstat connects to the pmcd(1) on host and fetches metrics from there. and yeah, like we said, multiple hosts may be monitored by supplying multiple -h flags π
alternatively, if you use the -a option, the metrics are retrieved from the Performance Co-Pilot archive files identified by 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. multiple sets of archives may be replayed by supplying multiple -a flags. and when the -a flag is used, the -P flag may also be used to pause the output after each interval βΈοΈ
stand-alone mode can only connect to the local host, using a set of archives implies a host name, and nominating a host precludes using an archive, so the options -L, -a and -h are mutually exclusive. pick one bestie, you can't have all three π
pmstat may relinquish its own timing control, and operate under the control of a pmtime(1) process that uses a GUI dialog to provide timing control. in this case, either the -g option should be used to start pmstat as the sole client of a new pmtime(1) instance, or -p should be used to attach pmstat to an existing pmtime(1) instance via the IPC channel identified by the port argument π
the -S, -T, -O and -A options may be used to define a time window to restrict the samples retrieved, set an initial origin within the time window, or specify a ``natural'' alignment of the sample times; refer to PCPIntro(1) for a complete description of these options. fr fr, go read it πΈ
β¨ OPTIONS β¨
the available command line options are:
-aarchive,--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 π¦-Aalign,--align=alignβ force the initial sample to be aligned on the boundary of a natural time unit align. refer toPCPIntro(1)for a complete description of the syntax for align π-g,--guimodeβ startpmstatas the client of a newpmtime(1)server process for replay of archived performance data using thepmtime(1)graphical user interface πΌοΈ-hhost,--host=hostβ fetch performance metrics frompmcd(1)on host, rather than from the default localhost π-Hpath,--hostsfile=pathβ specify the path to a file containing a set of hostnames wherepmcd(1)is running , rather than using the default localhost π-Kspec,--spec-local=specβ when fetching metrics from a local context (see-L), the-Koption may be used to control the DSO PMDAs that should be made accessible. the spec argument conforms to the syntax described inpmSpecLocalPMDA(3). more than one-Koption may be used π§©-l,--suffixβ prints the last 7 characters of a hostname in summaries involving more than one host (when more than one-hoption has been specified on the command line) βοΈ-L,--local-PMDAβ use a local context to collect metrics from DSO PMDAs on the local host without PMCD. see also-Kπ-npmnsfile,--namespace=pmnsfileβ load an alternative Performance Metrics Name Space (PMNS(5)) from the file pmnsfile π-Oorigin,--origin=originβ when reporting archived metrics, start reporting at origin within the time window (see-Sand-T). refer toPCPIntro(1)for a complete description of the syntax for origin π―-pport,--guiport=portβ attachpmstatto an existingpmtime(1)time control process instance via the IPC channel identified by the port argument. this option is normally only used by other tools, e.g.pmchart(1), when they launchpmstatwith synchronized time control π-P,--pauseβ pause between updates for archive replay βΈοΈ-ssamples,--samples=samplesβ the samples option defines the number of samples to be retrieved and reported. if samples is 0 or-sis not specified,pmstatwill sample and report continuously β this is the default behavior π-Sstarttime,--start=starttimeβ when reporting archived metrics, the report will be restricted to those records logged at or after starttime. refer toPCPIntro(1)for a complete description of the syntax for starttime β°-tinterval,--interval=intervalβ set the reporting interval to something other than the default 5 seconds. the interval argument follows the syntax described inPCPIntro(1), and in the simplest form may be an unsigned integer (the implied units in this case are seconds) β-Tendtime,--finish=endtimeβ when reporting archived metrics, the report will be restricted to those records logged before or at endtime π-V,--versionβ display version number and exit π-x,--xcpuβ the extended CPU metrics option, causes three additional CPU metrics to be reported, namely wait for I/O ("wa"), virtualisation steal time ("st"), and virtual guest time ("gu") π₯-z,--hostzoneβ change the reporting timezone to the local timezone at the host that is the source of the performance metrics, as identified via either the-hor-aoptions π-Ztimezone,--timezone=timezoneβ by default,pmtimereports the time of day according to the local timezone on the system wherepmstatis run. the-Zoption changes the timezone to timezone in the format of the environment variableTZas described inenviron(7)π°οΈ-?,--helpβ display usage message and exit π
β¨ OUTPUT β¨
the output from pmstat is directed to standard output, and the columns in the report are interpreted as follows:
- loadavg β the 1 minute load average π
- memory β the
swpdcolumn indicates average swap space used during the interval, in Kbytes. thefreecolumn indicates average free memory during the interval, in Kbytes. thebuffcolumn indicates average buffer memory in use during the interval, in Kbytes. thecachecolumn indicates average cached memory in use during the interval, in Kbytes.
if the values become large, they are reported as Mbytes (m suffix) or Gbytes (g suffix) π
- swap β the metrics in this area of the kernel instrumentation are of varying value. we try to report the average number of pages that are paged in (
pi) and out (po) per second during the interval. if the corresponding page swapping metrics are unavailable, we report the average rate per second of swap operations in (si) and out (so) during the interval. it is normal for thein'' values to be non-zero, but the system is suffering <red>memory stress</red> if theout'' values are non-zero over an extended period π
if the values become large, they are reported as thousands of operations per second (K suffix) or millions of operations per second (M suffix) π
- io β the
biandbocolumns indicate the average rate per second of block input and block output operations (respectfully) during the interval. unless all file systems have a 1 Kbyte block size, these rates do not directly indicate Kbytes transferred.
if the values become large, they are reported as thousands of operations per second (K suffix) or millions of operations per second (M suffix) π½
- system β interrupt rate (
in) and context switch rate (cs). rates are expressed as average operations per second during the interval. note that the interrupt rate is normally at least HZ (the clock interrupt rate, usually 100) interrupts per second β‘
if the values become large, they are reported as thousands of operations per second (K suffix) or millions of operations per second (M suffix) π
- cpu β percentage of CPU time spent executing user and "nice user" code (
us), system and interrupt processing code (sy), idle loop (id) π
if any values for the associated performance metrics are unavailable, the value appears as ``?'' in the output. iconic behavior honestly β
β¨ FILES β¨
$PCP_VAR_DIR/pmns/*β default PMNS specification files ποΈ$PCP_VAR_DIR/config/pmlogger/config.pmstatβpmlogger(1)configuration for creating an archive suitable for replay withpmstatπΌ
β¨ 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) π«Ά
bestie reminder: the vibe is yours to enjoy, but every flag, file and number up there is doing real work. don't skip the details, they're the whole point π β¨
...and there's more coming, so don't go anywhere π
π DEBUGGING OPTIONS π
okay so if things are being weird and you need the tea on what's actually happening inside, there's a flag for that. the -D or --debug option turns on extra diagnostics that get printed to stderr π
it's there to help triage problems, bestie.
β οΈ ngl, heads up: that info is sometimes cryptic and is primarily intended to provide guidance for developers rather than for end-users. so if it reads like a cryptic group chat you weren't added toβ¦ yeah, that's expected π
here's the thing: debug is a comma separated list of debugging options β so you can stack a bunch of them at once, no cap. and if you're sitting there like "okay but what are the options and what do they even mean", just run pmdbg(1) with the -l option and it'll hand you the full list of available debugging options plus their meanings. slay β¨
π SEE ALSO π
the whole extended cinematic universe, fr fr:
and that's the whole page, bestie π«Ά this one's brought to you by Performance Co-Pilot, filed under PCP, living in section PMSTAT(1) β go forth and monitor, you icon π
π¦ 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 7.2.1-2build1
- Copyright (c) 2016,2019 Red Hat
- 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