Working with Processes


Interacting with user-level and system-level processes is an important aspect of administering Linux. Table A.10 identifies many of the tools used for this purpose.

Table A.10. Commands for Working with Processes

COMMAND

GENERAL USAGE

DESCRIPTION

at

at TIME COMMAND

Executes a one-time command at the specified time.

bg

bg %JOB

Sends the specified job number to the background.

Note: Pressing Ctrl+Z will suspend the current foreground process. After the process has been suspended, it can be moved to the background using bg. To start a process in the back- ground, append an ampersand (&) to the end of the command. For example:

 updatedb & 

crontab

crontab [OPTIONS] USERNAME

Used to adjust or view a user's crontab. User crontabs contain commands scheduled for execution on a regular basis.

Common options include

-e Edit user's crontab

-l List user's crontab

fg

fg %JOB

Brings the specified job number to the foreground.

jobs

jobs

Displays job numbers for all back- ground processes.

kill

kill [SIGNAL] PID

Sends a kill signal to the specified process.

Common kill signals are

  

SIGHUP (1)

Hang-up

  

SIGINT (2)

Interrupt

  

SIGTERM (15)

Terminate (default)

  

SIGKILL (9)

Absolute kill

killall

killall [SIGNAL] PROCESS

Sends the specified kill signal to all processes using the designated process name.

nice

nice VALUE COMMAND

Executes the specified command using a manually designated nice value. Possible nice values range from -20 to +19. The lower the value, the higher the process priority.

nohup

nohup COMMAND

Executes the specified command in a no-hangup mode. This allows the process to continue execution after the initiating shell has been exited.

ps

ps [OPTIONS]

Displays information regarding running processes. Information displayed includes such things as the Process ID (PID), Parent Process ID (PPID), command line, and owner.

Common options include

-A All processes

-f Full option listing

pstree

pstree

Displays running processes in a hierarchical formatincluding parent and child relationships.

renice

renice VALUE PID

Adjusts the nice value of a currently running process.

top

top

Displays statistical information regarding processes (memory allocation, priority, CPU utilization).




    NovellR Open Enterprise Server Administrator's Handbook SUSE LINUX Edition
    Novell Open Enterprise Server Administrators Handbook, SUSE LINUX Edition
    ISBN: 067232749X
    EAN: 2147483647
    Year: 2005
    Pages: 178

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net