Additional Process Termination Tools

In addition to kill and killall, other tools can be used to terminate a process:

top The top program includes a kill option. Type k while top is displaying its process list and the program will ask for a PID. Enter a PID to have top kill it.

SysV Startup Scripts All major Linux distributions except Slackware use SysV startup scripts to start daemons and some other critical system tools. These scripts are typically located in /etc/init.d or /etc/rc.d/init.d, and you can call them manually, passing start, stop, or restart parameters to start, stop, or restart the service, respectively. These scripts generally use kill to terminate daemons, but they sometimes perform helpful shutdown housekeeping tasks, and so are usually preferable to using kill directly when shutting down a service.

GUI Process Monitors GUI tools such as the GNOME System Monitor and KPM can kill processes. Typically, there's a button called Kill, End Process, or something similar (see Figure 14.3); highlight a process and click this button to kill the process.

Window Manager Tools Window managers invariably provide close buttons on the windows they manage. Click or double-click this button to close the window. The underlying program should then terminate. This action doesn't always work as expected when a program is malfunctioning, though; and when the program isn't malfunctioning, it's usually better to terminate it through its usual exit mechanism, such as a File O Quit menu option.

xkill This program is a handy X-based process killer. Type xkill and X changes its cursor to a special pointer (sometimes a skull and crossbones, but not always). Click a window and X closes it. In response, the program that owned that window should shut down. This procedure has the benefit of enabling you to kill processes that you're running from another computer, using X's networking features. You can also terminate a window by passing a display name and resource ID to xkill, but of course you must know this information to do so. Consult the xkill man page for details. In my experience, xkill is usually quite effective at terminating misbehaving GUI applications.

Team LiB

0 0

Post a comment