Supervisor installation configuration, supervisor

Source: Internet
Author: User
Tags unix domain socket

Supervisor installation configuration, supervisor
Supervisor Introduction

Supervisor allows its users to control multiple processes on UNIX operating systems. The block is as follows:

Convenient

You need to writeRc. dScripts are usually inconvenient.Rc. dScript is a common form of process initialization, automatic start, and management, but writing and maintenance may be very painful. In addition,Rc. dThe script cannot automatically restart the crashed process, and many programs will not restart normally during the crash. Supervisord starts processes as their subprocesses and can be configured to automatically restart them upon crash. It can also be automatically configured to start the process in its own call.

Accuracy

Processes on UNIX are usually difficult to obtain accurate upper/lower states. Pidfiles often lie. Supervisord starts a process as a sub-process, so it always knows the real top/bottom status of its sub-process and can easily query the data.

Process Group

Processes usually start and stop in groups, sometimes even in "priority order. This is often hard to explain. Supervisor allows you to assign priority to processes and allow users to run commands such as "start all" and "restart all" through the supervisorctl client to start them in a pre-assigned priority order. In addition, processes can be grouped into "process groups", and a group of logically associated processes can be stopped and started as a unit.

Features

Simple

The Supervisor is easy to learn by configuring a simple INI-style configuration file. It provides many process options to make your life easier, such as restarting failed processes and Automatic Log rotation.

Centralized

Processes can be controlled independently or by groups. You can configure a Supervisor to provide local or remote command lines and Web interfaces.

Efficient

Supervisor starts its sub-processes through fork/exec. The sub-processes do not perform background processes.

High scalability

Supervisor has a simple Event Notification protocol that can be managed by programs written in any language, and a XML-RPC interface for control. It also uses extensions that can be used by Python developers.

Compatible

In addition to Windows, supervisor. It is tested and supported on Linux, Mac OS X, Solaris, And FreeBSD. It is completely written in Python, so the C compiler is not required for installation.

Stability

The Supervisor has been in existence for many years and has been used on many servers.

Supervisor Components

Supervisord

Supervisord server program. It starts subprograms in its own calls, responds to client commands, restarts crashed or exited sub-processes, and records its sub-processes.StdoutAndStderrOutput, and generate and process "events" corresponding to the sub-process lifecycle ".

Configuration file. This is usually located inIn/etc/supervisord. conf. This configuration file is a "Windows-INI" style configuration file. It is important to have proper file system permissions to protect this file because it may contain unencrypted user names and passwords.

Supervisorctl

The command line client name of the supervisor is supervisorctl. It provides a shell-like interface for the functions provided by the supervisor. From supervisorctl, you can connect to different supervisord, stop and start sub-processes, and obtain a list of running processes supervisord.

The command line Client communicates with the server through a UNIX domain socket or an Internet (TCP) socket. The server can assert that the client user should have an authentication credential before allowing him to execute the command. Client processes usually use the same configuration file as the server[Supervisorctl]Some configuration files can work normally.

Web Server

Web Server can access and view and control the process status through a browser.[Inet_http_server]To access the server URL (for exampleHttp: // localhost: 9001/To view and control the process status on the Web interface.

XML-RPC Interface

The same HTTP server serving the Web UI provides a XML-RPC interface that can be used to ask and control the supervisor and its running programs. Refer to the XML-RPC API documentation.

For installation and usage, click here wuguiyunwei.com

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.