PCP-PS(1)
π PCP-PS π
okay bestie, gather round, because we're reading the PCP-PS(1) page and honestly? it's giving "I know every single process on your box personally" energy. It lives in the General Commands Manual, and it's basically the cool older sibling of ps. Let's get into it. π¦
πΈ NAME πΈ
pcp-ps β report statistics for Linux Process. π«Ά
β¨ SYNOPSIS β¨
pcp [pcp options] ps [-e] [-U [username]] [-V --version] [-c Command
name] [-P pid1,pid2..] [-p pid1,pid2..] [-o col1,col2... or ALL] [-O
%mem,%cpu] [-d] [-Z timezone] [-z] [-?]
π DESCRIPTION π
So like, the pcp-ps command is what you use to monitor individual processes running on your system. With all its various options it lets you peek at genuinely useful info about your processes, no cap. That info includes CPU percentage, memory and stack usage, scheduling and priority. By default, pcp-ps reports live data for the local host. Periodt. π
π OPTIONS π
Quick heads-up before we go in: when you invoke this via the pcp(1) command, the -h/--host, -O/--origin, -t/--interval, -Z/--timezone and several other pcp options become indirectly available. For the full rundown on those, go read PCPIntro(1), okay? π
Now the extra command line options that pcp-ps itself brings to the table:
-eβ display all the process. And here's what you get per line:PIDβ process identifier.TTYβ the terminal associated with the process.TIMEβ the cumulated CPU time in[DD-]hh:mm:ssformat (time=TIME).CMDβ the task name along with its complete arguments.
-c[command name] β display the real Command name of the tasks being monitored instead of the UID. And if you actually pass a command name, then only tasks belonging to that specified command get shown. π―-U[username],--user-name[=username]β display the real user name of the tasks being monitored instead of the UID. If you pass a username, then only tasks belonging to that specified user are displayed.-V,--versionβ print the version number then exit. That's it, that's the whole job. π-ppid1,pid2..,--pid-list=pid1,pid2..β display only processes with the listed PIDs.-Pppid1,ppid2..,--ppid-list=ppid1,ppid2..β display only processes with the listed PPIDs.-oβ user-defined format. β¨
It's a single argument in the form of a blank-separated or comma-separated list, which is how you get to specify individual output columns. Choose your own adventure, bestie.
The argument to -o can be any of these:
%cpuβ HEADER%CPUβ cpu utilization of the process%memβ HEADER%MEMβ physical memory on the machine expressed as a percentagestartβ HEADERSTARTβ time the command startedtimeβ HEADERTIMEβ accumulated cpu time, user + systemclsβ HEADERCLSβ scheduling class of the process.cmdβ HEADERCMDβ see Task name. (aliasargs,command).argsβ HEADERCOMMANDβ to display the full program name with its arguments (use at last position in-olist to view full command)pidβ HEADERPIDβ the process IDppidβ HEADERPPIDβ parent process IDpriβ HEADERPRIβ priority of the processstateβ HEADERSβ seesrssβ HEADERRSSβ the non-swapped physical memory that a task has usedrtprioβ HEADERRTPRIOβ real-time prioritypnameβ HEADERPnameβ process namettyβ HEADERTTβ controlling tty (terminal)uidβ HEADERUIDβ seeeuidunameβ HEADERUSERβ seeeuservsizeβ HEADERVSZβ seevszwchanβ HEADERWCHANβ name of the kernel function in which the process is sleeping
π STANDARD FORMAT SPECIFIERS π
These are the different keywords you can use to control the output format (like, with option -o) or to sort the selected processes.
For example: pcp-ps -o pid,user,args
pidβ HEADERPIDβ a number representing the process ID%cpuβ HEADER%CPUβ%cpuutilization of the process in"##.#"format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage.%memβ HEADER%MEMβ%ratioof the process's resident set size to the physical memory on the machine, expressed as a percentage.argsβ HEADERCOMMANDβ Command with all its arguments as a string. Modifications to the arguments may be shown. The output in this column may contain spaces. A process marked<defunct>is partly dead, waiting to be fully destroyed by its parent. Sometimes the process args will be unavailable; when this happens, will instead print the executable name in brackets. πclassβ HEADERCLSβ scheduling class of the process. Field's possible values are:-β not reportedTSβSCHED_OTHERFFβSCHED_FIFORRβSCHED_RRBβSCHED_BATCHISOβSCHED_ISOIDLβSCHED_IDLEDLNβSCHED_DEADLINE?β unknown value
sβ HEADERSβ minimal state display. See alsostateif you want additional information displayed.euidβ HEADEREUIDβ effective user ID.vszβ HEADERVSZβ virtual memory size of the process in KiB (1024-byte units). Device mappings are currently excluded; this is subject to change.euserβ HEADEREUSERβ effective user name. This will be the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise.Allβ HEADERN/Aβ this option showsUSER,PID,PPID,PRI,%CPU,%MEM,VSZ,RSS,S,START,TIME,WCHANandCOMMAND.
π¦ MORE OPTIONS (yes, there's more, stay with me) π¦
-O%mem,%cpu,--sort=%mem,%cpuβ sort the output processes by the specified column. This sorting can now be used in conjunction with the-ooption to sort on any user-specified output column (e.g.,-o pid,%mem -O %mem). The column given to-O/--sortmust appear in the-olist. If the sorting column is missing from the output format, an error will be shown. (In case of an unsupported or missing field name, sorting will default to%cpu.)-dβ debug mode. Enable debug mode, which will cause debug messages to be written to stdout.-Ztimezone,--timezone=timezoneβ by default,pcp-psreports the time of day according to the local timezone on the system wherepcp-psis 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 replaying a PCP archive that was captured in a foreign timezone, the-zoption would almost always be used (the default reporting timezone is the local timezone, which may not be the same as the timezone of the PCP archive). π-?,--helpβ display usage message and exit.
π NOTES π
pcp-ps is inspired by the ps(1) command and aims to be command line and output compatible with it. So it's basically ps but make it PCP. iykyk. π
πΈ 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), pcp-ps(1), python(1), pmParseInterval(3), strftime(3) and environ(7).
no cap, that's the whole page. go forth and monitor those processes, bestie. π
and that's a wrap on PCP-PS(1) from Performance Co-Pilot β the PCP crew, PCP-PS(1) era. slay, bye. β¨π
π¦ 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.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 resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2022 Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms