PCP-PIDSTAT(1)
πΈ PCP-PIDSTAT(1) β General Commands Manual πΈ
okay bestie, sit down, hydrate, and let me tell you about pcp-pidstat β it's the PCP girlies' take on task-watching, and she EATS π
β¨ NAME β¨
pcp-pidstat β Report statistics for Linux tasks.
π SYNOPSIS π
pcp [pcp options] pidstat [-I] [-l] [-R] [-r] [-k] [-U [username]] [-V]
[-G processname] [-p pid1,pid2..] [-t interval] [-s count] [-a archive]
[-B state] [-f format] [-Z timezone] [-z] [-?]
π¦ DESCRIPTION π¦
So pcp-pidstat is literally for monitoring individual tasks running on your system, one by one, like a little spotlight on each process. π«Ά
With all its different options it lets you peek at genuinely useful stuff about your processes β CPU percentage, memory and stack usage, scheduling and priority. All the good gossip. π
By default pcp-pidstat reports live data for the local host. That's the vibe out of the box.
π OPTIONS π
When you invoke it through the pcp(1) command, a whole squad of options becomes indirectly available to you: -h/--host, -a/--archive, -O/--origin, -s/--samples, -t/--interval, -Z/--timezone, plus several other pcp options. Go read PCPIntro(1) for the full description of those, bestie, I'm not typing all that out here. π
The extra command line options that are actually pcp-pidstat's own are:
-Iβ In an SMP environment, this says the tasks' CPU usage should be divided by the total number of processors. Sharing is caring β¨-lβ Display the process command name and all its arguments. Full name, no nickname energy.-Rβ Report real-time priority and scheduling policy info. The following values may be displayed:UIDβ The real user identification number of the task being monitored.USERβ The name of the real user owning the task being monitored.PIDβ The identification number of the task being monitored.prioβ The real-time priority of the task being monitored.policyβ The scheduling policy of the task being monitored.Commandβ The command name of the task.
-rβ Report page faults and memory utilization. The following values may be displayed:UIDβ The real user identification number of the task being monitored.USERβ The name of the real user owning the task being monitored.PIDβ The identification number of the task being monitored.minflt/sβ Total number of minor faults the task has made per second, those which have not required loading a memory page from disk.majflt/sβ Total number of major faults the task has made per second, those which have required loading a memory page from disk.VSZβ Virtual Size: The virtual memory usage of entire task in kilobytes.RSSβ Resident Set Size: The non-swapped physical memory used by the task in kilobytes.%MEMβ The tasks currently used share of available physical memory.Commandβ The command name of the task.
-kβ Report stack utilization. The following values may be displayed:UIDβ The real user identification number of the task being monitored.USERβ The name of the real user owning the task being monitored.PIDβ The identification number of the task being monitored.StkSizeβ The amount of memory in kilobytes reserved for the task as stack, but not necessarily used.StkRefβ The amount of memory in kilobytes used as stack, referenced by the task.Commandβ The command name of the task.
-U [username],--user-name[=username]β Display the real user name of the tasks being monitored instead of the UID. And if you pass username, then only tasks belonging to that specified user get displayed. Filtered. Curated. π-V,--versionβ Print the version number then exit. Short and sweet, periodt.-G processname,--process-name=processnameβ Display only processes whose command name includes the string processname. Heads up: this string can be a regular expression. π-p pid1,pid2..,--pid-list=pid1,pid2..β Display only processes with the listed PIDs.-t interval,--interval=intervalβ Set the interval between two samples. The default is one second.-s count,--samples=countβ Set the number of samples to be displayed. Important lore: since the first sample is used for the rate conversion of some of the metrics, the total number of samples reported is one less than count. The default is continuous.-a archive,--archive=archiveβ Causespcp-pidstatto use the specified archive rather than connecting to PMCD. The argument to-ais 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.-Bβ Report process states. The argument to-Bis one of the following:detailβ Show total time processes have spent in each of the 5 different statesallβ Show total time processes spent in their current state[R,S,T,D,Z]β A comma separated list of process states. For example,-B R,Swill report processes currently in either R or S states and not report processes currently in any other states.
-fβ Use the format string for formatting the timestamp. The format will be used with thepython(1)datetime.strftimemethod, which is similar to that described instrftime(3). An empty format string (i.e,"") will remove the timestamps from the output. The default with stdout is%H:%M:%S.-Z timezone,--timezone=timezoneβ By default,pcp-pidstatreports the time of day according to the local timezone on the system wherepcp-pidstatis run. The-Zoption changes the timezone to timezone in the format of the environment variableTZas described inenviron(7).-z,--hostzoneβ Change the reporting timezone to the local timezone at the host that is the source of the performance metrics. When you're replaying a PCP archive that was captured in a foreign timezone, you would almost always use-z(the default reporting timezone is the local timezone, which may not be the same as the timezone of the PCP archive). Timezone glow-up. π-?,--helpβ Display usage message and exit.
π NOTES π
pcp-pidstat is inspired by the pidstat(1) command and aims to be command line and output compatible with it. Respecting her ancestors fr fr. π
π 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).
π₯ SEE ALSO π₯
PCPIntro(1), pcp(1), pidstat(1), python(1), pmParseInterval(3), strftime(3) and environ(7).
okay that's the whole page bestie, you're officially educated π this one came from Performance Co-Pilot (PCP) β same PCP-PIDSTAT(1) energy, General Commands Manual vibes β and you can find her in the PCP section. go forth and monitor ur tasks, you main character. πβ¨
π¦ 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
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· 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.1.0-6.fc44 Β· 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 questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2018,2019 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms