12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System Configuration—System ManagementProcesses and DaemonsEach running program is called a process. Your server has a number of processesrunning all the time, including the other background processes that keep yoursystem running. Each process has a unique Process ID (PID) that is assigned by thesystem. The first system process, init, always has PID 1. This process is launched bythe system kernel during boot process. Any other process that is launched after inithas a unique PID between 2 to 99999. Once a process gets completed, the PID willbe returned to the system. When the system reaches PID 99999, it starts assigningavailable PIDs starting from 2 over and over again. The processes are identified bytheir PIDs.A daemon is a process that runs in the background, detached from the terminal, andwaits for a system or a network event to act upon. For example, a web server (That ishttpd) is a daemon that runs in the background and listens on TCP port 80 for anyincoming connection. As soon as it receives a request to serve a page, it performs thenecessary steps to load the object from the disk and transfer it via network tothe client. Another example of a daemon is the cron scheduler. The cron daemonis always running in the background waiting for the specific time to runappropriate commands.Many daemons have a trailing "d" in their name that means the process isa daemon. This includes httpd, snmpd, pop3d, moused, sshd, and so on.There are several tools available in the base system that gives you full control overprocesses. Using these tools, you can see which processes are running and how muchCPU time or memory they are using, what their PID number is, and so on. You canalso control the behavior of the running processes by sending them signals.A signal is a message that is sent to a running process by the system. Processes havedifferent reactions based on the received signals. A list of the most commonly usedsignals are found in the following table:Signal Signal name Description1 HUP Causes process to reload its configuration2 INT Interrupt3 QUIT Quit6 ABRT Abort9 KILL Non-catchable, non-ignorable, implicit kill15 TERM Software termination signalSending signals to processes are explained later in this chapter.[ 64 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!