Process management tool in Linux-supervise

Source: Internet
Author: User
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:
    
QUOTE:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.