Name

ps

Synopsis

    ps [options]

Report on active processes. In options, list arguments should either be separated by commas or put in double quotes. In comparing the amount of output produced, note that -e > -d > -a and -l > -f. In the BSD version (/usr/ucb/ps), options work much differently; you can also display data for a single process.

Options

-a

List all processes except group leaders and processes not associated with a terminal.

-A

Same as -e.

-c

List scheduler data set by priocntl (an administrative command).

-d

List all processes except session leaders.

-e

List all processes.

-f

Produce a full listing.

-g list

List data only for specified list of group leader ID numbers (i.e., processes with same ID and group ID).

-G list

Show information for processes whose real group ID is found in list.

-j

Print the process group ID and session ID.

-l

Produce a long listing.

-L

Print information about lightweight processes.

-n file

Use the alternate file for the list of function names in the running kernel (default is /unix). Accepted for compatibility, but ignored.

-o format

Customize information according to format. Rarely used.

-p list

List data only for process IDs in list.

-P

Print the processor number on which the process or lightweight process is bound.

-s list

List data only for session leader IDs in list.

-t list

List data only for terminals in list (e.g., tty1).

-u list

List data only for usernames in list.

-U uidlist

Show information for processes whose real user ID is found in ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.