The tool for process management in Linux-supervise-general Linux technology-Linux technology and application information. For details, refer to the following section. Supervise is a daemontools tool that can be used to monitor the running status of applications in unix. When an application exception occurs, supervise can restart the specified program. This article briefly introduces how to install and use supervise.
I. Installation
Create
/Pacakage directory (you can create any directory. Here, the package is used to keep it consistent with that of the English author ):
Mkdir-p/package
Chmod 1755/package
Cd/package
Download daemontools-0.76.tar.gz to the/package directory and decompress the package.
Tar xvzf daemontools-0.76.tar.gz
Cd admin/daemontools-0.76
Compile and install the daemontools Program
Package/install
2. Use the supervise program for program management and monitoring
The supervise execution command is supervise Path, where Path is the specified Path, which can be a relative Path or an absolute Path. Under the Path, there must be a run script. supervise calls this script and monitors and manages the programs running in this script.
An important function of supervise is to check whether the Program executed in the run script works normally. If it is found to have died, supervise will re-execute the run script and restart the specified program. This is very necessary for many server programs. No one wants to crawl out of the bed at am late at night and restart the server.
The following is an example of using supervise.
Iii. Example
Assume that daemontools has been installed, create a test directory, and enter the Directory
Mkdir test
Cd test
Write a simple test program test. c In this directory: