O'Reilly logo

Mac OS X Panther in a Nutshell, 2nd Edition by Jason McIntosh, Chuck Toporek, Chris Stone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ps

Synopsis

ps [options]

Reports on active processes. Note that you don’t need to include a - before options. In options, list arguments should either be separated by commas or be put in double quotes.

Options

a

List all processes.

c

List the command name without the path.

e

Include environment.

h

Include a header with each page of information.

j

List information for keywords: user, pid, ppid, pgid, sess, jobc, state, tt, time, and command.

L

List all keywords.

l

List information for keywords: uid, pid, ppid, cpu, pri, nice, vsz, rss, wchan, state, tt, time, and command.

M

List each tasks threads.

m

Sort by memory usage.

O

Append the keywords that are in a list after the PID. The title of the keyword can be changed by using an = sign after the keyword. (keyword=newtitle)

o

Same as O except it uses only the supplied keywords for the output of ps.

p

List information for the supplied PID.

r

List by CPU rather than by PID.

S

Include child processes’ CPU time and page faults.

T

List information for standard input process.

t tty

Display only processes running on tty.

U

List processes belonging to username.

u

List information for keywords: user, pid, %cpu, %mem, vsz, rss, tt, state, start, time, and command. The listing will be as if the -r option was supplied to ps.

v

List information for keywords: pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz, %cpu, %mem, and command. The listing will be as if the -m option was supplied to ps.

w

Wide format. Don’t truncate long lines.

x

Include ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required