Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does supervisor mean?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what supervisor means, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

Supervisor introduction

Supervisor allows its users to control multiple processes on UNIX-like operating systems. The blocks are as follows:

Convenient

It is often inconvenient to write rc.d scripts for each process instance. Rc.d scripts are a common form of process initialization / automatic startup / management, but writing and maintenance can be painful. In addition, rc.d scripts do not automatically restart crashed processes, and many programs do not restart normally when they crash. The Supervisord startup process acts as its child process and can be configured to restart them automatically in the event of a crash. It can also be automatically configured to start the process in its own call.

Accuracy.

It is often difficult for processes on UNIX to get an accurate up / down state. Pidfiles often lies. Supervisord starts the process as a child process, so it always knows the true up / down state of its child processes, and can easily query this data.

Process group

Processes usually need to be started and stopped on a group-by-group basis, sometimes even in the priority order. It is often difficult to explain this. Supervisor allows you to assign priorities to processes and allows users to issue commands through the supervisorctl client, such as "start all" and "restart all", to start them in a pre-assigned priority order. In addition, processes can be grouped into "process groups", and a set of logically associated processes can be stopped and started as a unit.

Features

simple

Supervisor is configured through a simple INI-style configuration file, making it easy to learn. It provides many per-process options to make your life easier, such as restarting failed processes and automatic log rotation.

focus

Processes can be controlled individually or in groups. You can configure Supervisor to provide a local or remote command line and Web interface.

High efficiency

Supervisor starts its child processes through fork / exec, which does not perform background processes.

Strong expansibility

Supervisor has a simple event notification protocol that can be managed by programs written in any language, as well as a XML-RPC interface for control. It is also built using extension points that can be exploited by Python developers.

Compatible

Supervisor except Windows. It has been tested and supported on Linux,Mac OS Xonomer Solaris and FreeBSD. It is written entirely in Python, so the installation does not require a C compiler.

Stability.

Supervisor has been around for many years and has been used on many servers.

Supervisor component

Supervisord

Supervisord server program. It is responsible for starting subprograms in its own calls, responding to client commands, restarting crashed or exited child processes, recording the stdout and stderr outputs of its child processes, and generating and handling "events" corresponding to the life cycle of child processes.

Configuration file. This is usually in / etc/supervisord.conf. This profile is a "Windows-INI" style configuration file. It is important to have appropriate file system permissions to protect this file because it may contain an unencrypted user name and password.

Supervisorctl

The command line client for supervisor is named supervisorctl. It provides a shell-like interface for the functionality provided by supervisor. From supervisorctl, users can connect to different supervisord, stop and start child processes, and get a list of running processes supervisord.

The command line client communicates with the server through UNIX domain sockets or Internet (TCP) sockets. The server can assert that the client's user should have authentication credentials before allowing him to execute the command. Client processes usually use the same configuration file as the server, but any configuration file with a [supervisorctl] section in it works fine.

Web Server

Web Server can view and control the process status through the browser, configure it in the [inet_http_server] block of the file, and access the server URL (such as http:// localhost:9001 /) to view and control the process status through the Web interface.

XML-RPC interface

The same HTTP server that serves Web UI provides a XML-RPC interface that can be used to query and control supervisor and the programs it is running. Refer to the XML-RPC API documentation.

The above is all the contents of this article "what does supervisor mean?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report