Name

ps

Synopsis

ps [options]

Description

Report on active processes. Note that you do not need to include a - before options. In options, list arguments should either be separated by commas or be put in double quotes. In comparing the amount of output produced, note that e prints more than a and l prints more than f.

Options

pids

Include only specified processes, which are given in a comma-delimited list.

a

List all processes.

c

Consult task_struct for command name.

e

Include environment.

f

“Forest” family tree format.

h

Suppress header.

j

Jobs format.

l

Produce a long listing.

m

Memory format.

n

Print user IDs and WCHAN numerically.

r

Exclude processes that are not running.

s

Signal format.

--sort delimiter[+|-]key[,[+|-]key[,...]]

Similar to O, but designed to protect multiletter sort keys. See the later list, “Sort keys”.

t tty

Display only processes running on tty.

u

Include username and start time.

v

vm format.

w

Wide format. Don’t truncate long lines.

x

Include processes without an associated terminal.

O[+|-] key[,[+|-]key[,...]]

Sort processes. (See the following list, “Sort keys.”)

+

Return key to default direction.

-

Reverse default direction on key.

S

Include child processes’ CPU time and page faults.

Sort keys

c, cmd

Name of executable.

C, cmdline

Whole command line.

f, flags

Flags.

g, pgrp

Group ID of process.

G, tpgid

Group ID of associated tty.

j, cutime

Cumulative user time.

J, cstime

Cumulative system time.

k, utime

User time.

K, stime

System time.

m, min_flt

Number ...

Get Linux in a Nutshell, Third 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.