Managing Processes From the Command Line


You can determine the currently running processes from the command line using the ps or top command. Use top to see a regularly updated view of system utilization, including memory usage, page faults, and the set of currently executing processes.

In the leftmost column of the top tabular output, you will find the process identifier (PID) associated with that process. You can also use the ps command to determine the PID of a process. The PID is used to send a message to a particular process. For example, the command ps -auxww | grep TextEdit prints the PID# and other information for just the TextEdit process.

When you have the PID# for a process, you can send it the command kill -9 PID#, where PID# is the number associated with the TextEdit process. This command asks the process with the given PID to terminate immediately. You can send a variety of commands to running processes, such as rereading a configuration file or logging additional information.

The killall command enables you to signal processes by name rather than by PID. The command killall -KILL TextEdit force-quits all processes that belong to you with the name TextEdit.




Apple Training Series. Mac OS X System Administration Reference, Volume 1
Apple Training Series: Mac OS X System Administration Reference, Volume 1
ISBN: 032136984X
EAN: 2147483647
Year: 2005
Pages: 258
Authors: Schoun Regan

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