PCP-PS(1)

πŸ“¦
version 7.2.2 Β· 4 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– 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:ss format (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. πŸ‘‘
  • -p pid1,pid2.., --pid-list=pid1,pid2.. β€” display only processes with the listed PIDs.
  • -P ppid1,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 percentage
  • start β€” HEADER START β€” time the command started
  • time β€” HEADER TIME β€” accumulated cpu time, user + system
  • cls β€” HEADER CLS β€” scheduling class of the process.
  • cmd β€” HEADER CMD β€” see Task name. (alias args, command).
  • args β€” HEADER COMMAND β€” to display the full program name with its arguments (use at last position in -o list to view full command)
  • pid β€” HEADER PID β€” the process ID
  • ppid β€” HEADER PPID β€” parent process ID
  • pri β€” HEADER PRI β€” priority of the process
  • state β€” HEADER S β€” see s
  • rss β€” HEADER RSS β€” the non-swapped physical memory that a task has used
  • rtprio β€” HEADER RTPRIO β€” real-time priority
  • pname β€” HEADER Pname β€” process name
  • tty β€” HEADER TT β€” controlling tty (terminal)
  • uid β€” HEADER UID β€” see euid
  • uname β€” HEADER USER β€” see euser
  • vsize β€” HEADER VSZ β€” see vsz
  • wchan β€” HEADER WCHAN β€” 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 β€” HEADER PID β€” a number representing the process ID
  • %cpu β€” HEADER %CPU β€” %cpu utilization 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 β€” %ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.
  • args β€” HEADER COMMAND β€” 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 β€” HEADER CLS β€” scheduling class of the process. Field's possible values are:
    • - β€” not reported
    • TS β€” SCHED_OTHER
    • FF β€” SCHED_FIFO
    • RR β€” SCHED_RR
    • B β€” SCHED_BATCH
    • ISO β€” SCHED_ISO
    • IDL β€” SCHED_IDLE
    • DLN β€” SCHED_DEADLINE
    • ? β€” unknown value
  • s β€” HEADER S β€” minimal state display. See also state if you want additional information displayed.
  • euid β€” HEADER EUID β€” effective user ID.
  • vsz β€” HEADER VSZ β€” virtual memory size of the process in KiB (1024-byte units). Device mappings are currently excluded; this is subject to change.
  • euser β€” HEADER EUSER β€” 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 β€” HEADER N/A β€” this option shows USER, PID, PPID, PRI, %CPU, %MEM, VSZ, RSS, S, START, TIME, WCHAN and COMMAND.

πŸ¦‹ 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 -o option to sort on any user-specified output column (e.g., -o pid,%mem -O %mem). The column given to -O/--sort must appear in the -o list. 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.
  • -Z timezone, --timezone=timezone β€” by default, pcp-ps reports the time of day according to the local timezone on the system where pcp-ps is run. The -Z option changes the timezone to timezone in the format of the environment variable TZ as described in environ(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 -z option 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