PCP-MPSTAT(1)
pcp-mpstat π β¨
okay so hi bestie π«Ά you just opened the General Commands Manual page for pcp-mpstat, and ngl it's giving very "let me tell you about your CPUs" energy. grab a boba, we're doing this π§
πΈ NAME πΈ
pcp-mpstat β report CPU and interrupt related statistics. literally its whole job, no cap π
β¨ SYNOPSIS β¨
pcp [pcp options] mpstat [ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU |
ALL } ] [ -P { cpu1,cpu2 [,...] | ON | ALL } ] [ -t interval ] [ -s
count ] [ -a archive ] [ -? ]
π¦ DESCRIPTION π¦
so pcp-mpstat writes to standard output the activities for every available processor, and processor 0 is the first one β like, it's the main character, everyone else follows π
if you don't pick any activity or option, the default report is the CPU utilization (-u) report. the vibes choose for you π
the interval parameter sets how many seconds go by between each report. default? one second. iconic, punctual, never late β°
the value of the count parameter decides how many samples get displayed. the default is continuous β she just keeps going, forever, no off switch π
π OPTIONS π
when you invoke it via the pcp(1) command, the -h/--host, -a/--archive, -O/--origin, -s/--samples, -t/--interval, -Z/--timezone and several other pcp options become indirectly available β¨ β peep PCPIntro(1) for the full rundown of those.
the extra command line options you get just for pcp-mpstat are:
-Aβ this one is equivalent to specifying-u -I ALL -P ALL. it's the "give me everything" button, she does not hold back π-I { SUM | CPU | SCPU | ALL }β report interrupts statistics.- with the
SUMkeyword,pcp-mpstatreports the total number of interrupts per processor. the following values get displayed:CPUβ processor number. the keywordallindicates that statistics are calculated as averages among all processors.intr/sβ show the total number of interrupts received per second by the CPU or CPUs.
- with the
CPUkeyword, the number of each individual interrupt received per second by the CPU or CPUs is displayed. these interrupts are the ones under thekernel.percpu.interruptsmetric tree π³ numeric instance names (for example IRQ numbers) are listed before non-numeric labels so the output stays stable as new named handlers get added β consistency queen π if the current source (host or archive) does not export per-CPU interrupt metrics, the report printsNo per-CPU interrupt metrics available for this context.and skips the table. not me getting ghosted by the metrics π - with the
SCPUkeyword, the number of each individual software interrupt received per second by the CPU or CPUs is displayed. software interrupts are those under thekernel.percpu.softirqstree π± the output follows the canonical softirq ordering ofHI,TIMER,NET_TX,NET_RX,BLOCK,IRQ_POLL,TASKLET,SCHED,HRTIMERandRCUbefore any remaining softirq labels, ensuring consistent column placement across samples. organized, aligned, ate π when per-CPU softirq metrics are not present in the current context, the report emitsNo per-CPU softirq metrics available for this context.instead of the table. - the
ALLkeyword is equivalent to specifying all the keywords above, so literally all the interrupts statistics get displayed. all of them. every last one π₯
- with the
-P { cpu1,cpu2[,...] | ON | ALL }β indicate the processor number for which statistics are to be reported.cpu1andcpu2are the processor numbers, and you can hand over a whole list of required processor numbers. note that processor 0 is the first processor π₯ theONkeyword means statistics are reported for every online processor, whereas theALLkeyword means statistics are reported for all processors.-uβ report CPU utilization. the following values are displayed:CPUβ processor number. the keywordALLindicates that statistics are calculated as averages among all processors.%usrβ show the percentage of CPU utilization that occurred while executing at the user level (application).%niceβ show the percentage of CPU utilization that occurred while executing at the user level with nice priority. so polite π₯Ί%sysβ show the percentage of CPU utilization that occurred while executing at the system level (kernel). note that this does not include time spent servicing hardware and software interrupts.%iowaitβ show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. the "waiting on the disk" percentage, we've all been there π%irqβ show the percentage of time spent by the CPU or CPUs to service hardware interrupts.%softβ show the percentage of time spent by the CPU or CPUs to service software interrupts.%stealβ show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor. yes bestie, you got stolen from π%guestβ show the percentage of time spent by the CPU or CPUs to run a virtual processor.%gniceβ show the percentage of time spent by the CPU or CPUs to run a niced guest.%idleβ show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request. the chill percentage π- Note: on SMP machines a processor that does not have any activity at all is a disabled (offline) processor. she's simply not participating π
-sN,--samples=N β set the number of samples to be displayed. since the first sample is used for the rate conversion of some of the metrics, the total number of samples reported are one less than N. yes that's right, you asked for N and you get N-1, that's just the deal π€ default is continuous.-tDELTA,--interval=DELTA β set the interval between two samples. the default is one second β±οΈ-aFILE,--archive=FILE β causespcp-mpstatto use the specified archive rather than connecting to PMCD. the argument to-ais a comma-separated list of names, and each one may be the base name of an archive or the name of a directory containing one or more archives π¦-V,--versionβ print version number then exit. quick lil flex π-?,--helpβ print usage message then exit. your girl is helpful like that π«Ά
π EXAMPLES π
pcp-mpstat -t 2 -s 5
display four reports of global statistics among all processors at two second intervals. (four! not five! remember the whole N-1 thing π)
pcp mpstat -P ALL -t 2 -s 5
display four reports of statistics for all processors at two second intervals. every single processor is getting a shoutout π£οΈ
π NOTES π
pcp-mpstat is inspired by the mpstat(1) command and aims to be command line and output compatible with it. homage, but make it PCP β¨
π§ ENVIRONMENT π§
the TZ and LC_TIME environment variables can be used to override the default date display format for pcp-mpstat. timezone and date vibes, fully customizable π
π 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, peep pmGetOptions(3).
π SEE ALSO π
PCPIntro(1), pcp(1), mpstat(1), pmParseInterval(3), pmTraversePMNS(3) and environ(7). go read them, i'll wait π
and that's the whole page bestie, no skips, no cuts, every single flag accounted for π«Ά
Performance Co-Pilot β PCP β PCP-MPSTAT(1) π
periodt, that's a wrap, go check your CPUs β¨
π¦ 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
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-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) 2017,2019 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms