Unix-like OS process monitoring and control tool Supervisor

Source: Internet
Author: User

Unix-like OS process monitoring and control tool Supervisor

Supervisor is a client server system that allows users to monitor and control the number of processes on Unix operating systems.

Official http://supervisord.org

Install
1. easy_install supervisor
2.
Setuptools (latest) from http://pypi.python.org/pypi/setuptools.
Meld3 (latest) from http://www.plope.com/software/meld3.
Elementtree (latest) from http://effbot.org/downloads#elementtree.

Create a configuration file
Echo_supervisord_conf>/etc/supervisord. conf
Configuration File
Supervisord-c supervisord. conf

Find the path of the configuration file
-C: Specify the configuration file
If no configuration file is specified, the search sequence is as follows:
1 $ CWD/supervisord. conf
2 $ CWD/etc/supervisord. conf
3/etc/supervisord. conf

Configuration File description

HTTP/XML-RPC-related configuration
[Unix_http_server]
File =/tmp/supervisor. sock
Chmod= 0777
Chown = nobody: nogroup
Username = user
Password = 123

Web Management Interface Configuration
[Inet_http_server]
Port = 127.0.0.1: 9001
Username = user
Password = 123

[Supervisorctl]
Serverurl = unix: // tmp/supervisor. sock and [unix_http_server] Match
Username = chris
Password = 123
Prompt = mysupervisor

Log environment and other configurations
[Supervisord]
Logfile =/tmp/supervisord. log
Logfile_maxbytes = 50 MB
Logfile_backups = 10
Loglevel = info
Pidfile =/tmp/supervisord. pid
Nodaemon = false
Minfds= 1024
Minprocs = 200
Umask = 022
User = chrism
Identifier = supervisor
Directory =/tmp
Nocleanup = true
Childlogdir =/tmp
Strip_ansi = false
Environment = KEY1 = "value1", KEY2 = "value2"

Configure a single process
[Program: theprogramname]
Command =/bin/cat; the program (relative uses PATH, can take args)
Process_name = % (program_name) s; process_name expr (default % (program_name) s)
Numprocs = 1; number of processes copies to start (def 1)
Directory =/tmp; directory to cwd to before exec (def no cwd)
Umask = 022; umask for process (default None)
Priority= 999; the relative start priority (default 999)
Autostart = true; start at supervisord start (default: true)
Autorestart = unexpected; whether/when to restart (default: unexpected)
Startsecs = 1; number of secs prog must stay running (def. 1)
Startretries = 3; max # of serial start failures (default 3)
Exitcodes =; 'expected' exit codes for process (default)
Stopsignal = QUIT; signal used to kill process (default TERM)
Stopwaitsecs = 10; max num secs to wait b4 SIGKILL (default 10)
Stopasgroup = false; send stop signal to the UNIX process group (default false)
Killasgroup = false; SIGKILL the UNIX process group (def false)
User = chrism; setuid to this UNIX account to run the program
Redirect_stderr = true; redirect proc stderr to stdout (default false)
Stdout_logfile =/a/path; stdout log path, NONE for none; default AUTO
Stdout_logfile_maxbytes = 1 MB; max # logfile bytes b4 rotation (default 50 MB)
Stdout_logfile_backups = 10; # of stdout logfile backups (default 10)
Stdout_capture_maxbytes = 1 MB; number of bytes in 'capturemode' (default 0)
Stdout_events_enabled = false; emit events on stdout writes (default false)
Stderr_logfile =/a/path; stderr log path, NONE for none; default AUTO
Stderr_logfile_maxbytes = 1 MB; max # logfile bytes b4 rotation (default 50 MB)
Stderr_logfile_backups = 10; # of stderr logfile backups (default 10)
Stderr_capture_maxbytes = 1 MB; number of bytes in 'capturemode' (default 0)
Stderr_events_enabled = false; emit events on stderr writes (default false)
Environment = A = "1", B = "2"; process environment additions (def no adds)
Serverurl = AUTO; override serverurl computation (childutils)

In addition
[Fcgi-program: x]

[Eventlistener: x]

[Rpcinterface: x]

Contains the specified configuration file
[Include]
Files =/an/absolute/filename. conf/an/absolute/*. conf foo. conf config ??. Conf

This article permanently updates the link address:

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.