O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

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]

Report on active processes. Following the BSD tradition, a minus sign is allowed but not required in front of options. In options, list arguments should either be separated by commas or put in double quotes.

Options

-a

List other users' processes, as well as your own.

-A

List other users' processes, including those without a controlling terminal.

-c

In the command column, print just the command name, instead of the full command line.

-C

Use a different algorithm for calculating CPU percentage which ignores resident time.

-e

Include environment information after the command.

-h

Print a header on each page of output.

-j

Jobs format. Print the information for the command, jobc, pgid, pid, ppid, sess, state, time tt, and user keywords.

-l

Produce a long listing. Print the information for the command, cpu, nice, pid, ppid, pri, rss, state, time tt, uid, vsz, and wchan keywords.

-L

Print list of keywords (field specifiers) that can be used for output formatting or for sorting.

-m

Sort by memory usage, not by process ID.

-M

Show threads.

-N, --deselect

Negate the selection.

-o list

Like -O, but use only the keywords in list.

-O list

Append the keywords in list after the PID. The title of each keyword may be changed by using an = sign after the keyword (keyword = newtitle).

-p nums

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

-r

Sort by CPU usage instead of by process ID number.

-S

Include dead child process data in parent's total. ...

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