Process and Resource Management

Job control

command &

Run the specified command in the background.

^Z

Stop foreground process.

jobs

List background processes.

fg [job]

Resume the specified job in the foreground/background.

bg [job]

job defaults to the stopped foreground job. %n refers to background job n. %?str refers to the background job whose command string contains the specified character string.

~^Z

Suspend an rlogin session. Add an additional tilde for each level of nesting (e.g., ~~^Z suspends a second-level rlogin session back to the first-level rlogin session, while ~^Z suspends the second-level session back to the local session).

ps

ps aux

AIX, FreeBSD, Linux

 

/usr/ucb/ps aux

Solaris

 

ps -elf

System V version: HP-UX

Display the detailed process list. The al option to the first two commands produces a different listing, which displays the process priority and nice number.

ps output columns

USER (HP-UX: UID)

Username of the process owner

PID

Process ID

%CPU

Estimated fraction of CPU consumed (FreeBSD); CPU time/elapsed time (AIX, Solaris, Linux).

%MEM

Estimated fraction of consumed system memory

SZ

Virtual memory used, in KB (HP-UX: pages)

RSS

Physical memory used, in KB

TT (HP-UX: TTY)

TTY associated with the process

STAT (HP-UX: S)

Current process state flag(s):

R

Running or runnable

S

Sleeping

I

Idle (HP-UX: intermediate state)

T

Stopped

Z

Zombie process

D

Disk wait (not HP-UX)

X

Growing: waiting for memory (HP-UX)

K

Available ...

Get Essential System Administration Pocket Reference 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.