Introduction to Linux Process Management

|
Rather Have Fast and Secure Remote
Control?
|
Killing Stalled Processes
Processes that have stalled or frozen can sometimes cause problems. One of the jobs of a Linux administrator is to identify and resolve stalled processes. The clues that a process has stalled can range from an unresponsive GUI to a noted decrease in system performance. Either way, once you have identified that a processes has stalled you can terminate that process using the [kill] command. The syntax is fairly simple. You kill process by referencing its process ID or PID. This information can be seen in the output of just about any iteration of the ps command. To kill a process you pass a signal to that process. The default signal tells the process to perform a clean shutdown. Here are a few examples.
To kill a single process:
ps
PID TT STAT TIME COMMAND
9408 p9 S 0:00 ue temp2.xdh
9450 pa S 0:01 -Tcsh (Tcsh)
9501 pa T 0:00 less csh.1
9503 pa R 0:00 ps
kill 9501
This kills process number 9501. Notice that the ps command which is entered to check on the process ID’s has the latest process number.
To kill a process that refuses to die:
kill -9 9352
This makes a certain kill of process number 9352.
To kill a background job:
jobs
[1] + Running xterm -g 70x55
kill %1
[1] Done xterm -g 70x55
This kills job number 1 (one); the only job that is currently running.
To kill more than one process:
kill 8939 9543
This kills processes 8939 and 9543.
It is important to note that the kill command does not perform only negative actions. It can also be used to restart processes, and to keep processes running, even after a logout.
Written by Corey Hynes - Visit WebsiteNext post in Linux:
Configuring a Linux Newsgroup (NNTP) Server
Previous post in Linux:
Managing Shared Libraries and Installing Software from Tarballs
All Tutorials by Category:
- CCDA Study Guide
- CCNA Study Guide Chapter 01
- CCNA Study Guide Chapter 02
- CCNA Study Guide Chapter 03
- CCNA Study Guide Chapter 04
- CCNA Study Guide Chapter 05
- CCNA Study Guide Chapter 06
- CCNA Study Guide Chapter 07
- CCNA Study Guide Chapter 08
- CCNA Study Guide Chapter 09
- CCNA Study Guide Chapter 10
- CCNA Study Guide Chapter 11
- CCNA Study Guide Chapter 12
- Cognos
- Computer Hardware
A
C
D
E
F
G
H
I
L
M
N
Entire site Copyright © 1999-2007 2000Trainers.com, all rights reserved.
Content on this site may not be copied or reproduced in any way without permission.


