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 SUM keyword, pcp-mpstat reports the total number of interrupts per processor. the following values get displayed:
      • CPU β€” processor number. the keyword all indicates 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 CPU keyword, the number of each individual interrupt received per second by the CPU or CPUs is displayed. these interrupts are the ones under the kernel.percpu.interrupts metric 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 prints No per-CPU interrupt metrics available for this context. and skips the table. not me getting ghosted by the metrics πŸ™ˆ
    • with the SCPU keyword, the number of each individual software interrupt received per second by the CPU or CPUs is displayed. software interrupts are those under the kernel.percpu.softirqs tree 🌱 the output follows the canonical softirq ordering of HI, TIMER, NET_TX, NET_RX, BLOCK, IRQ_POLL, TASKLET, SCHED, HRTIMER and RCU before 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 emits No per-CPU softirq metrics available for this context. instead of the table.
    • the ALL keyword is equivalent to specifying all the keywords above, so literally all the interrupts statistics get displayed. all of them. every last one πŸ”₯
  • -P { cpu1,cpu2[,...] | ON | ALL } β€” indicate the processor number for which statistics are to be reported. cpu1 and cpu2 are the processor numbers, and you can hand over a whole list of required processor numbers. note that processor 0 is the first processor πŸ₯‡ the ON keyword means statistics are reported for every online processor, whereas the ALL keyword means statistics are reported for all processors.
  • -u β€” report CPU utilization. the following values are displayed:
    • CPU β€” processor number. the keyword ALL indicates 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 πŸ™ˆ
  • -s N, --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.
  • -t DELTA, --interval=DELTA β€” set the interval between two samples. the default is one second ⏱️
  • -a FILE, --archive=FILE β€” causes pcp-mpstat to use the specified archive rather than connecting to PMCD. the argument to -a is 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