In Processes, we mentioned that it was possible to monitor processes; that is what we will cover in this chapter. To understand the operations we are going to perform here, it is helpful to know a bit more about them.
As with files, all processes that run on a GNU/Linux system are organized in the form of a tree. The root of this tree is init. Each process has a number (its PID, Process ID), together with the number of its parent process (PPID, Parent Process ID). The PID of init is 1, and so is its PPID: init is its own father.
Every process in Unix can react to signals sent to it. There are 64 different signals. The 32 "higher" signals (33 to 64) are real-time signals, and are out of the scope of this chapter. For each of these signals, the process can define its own behavior, except for two signals: signal number 9 (KILL), and signal number 19 (STOP).
Signal 9 kills a process irrevocably, without giving it the time to terminate properly. This is the signal you send to a process which is stuck or exhibits other problems. A full list of signals is available using the command kill -l.