O'Reilly logo

Essential System Administration Pocket Reference by Æleen Frisch

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

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 ...

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