Linux background process management tool: the supervisor Linux background processes run in several ways, such as nohup and screen. However, if it is a service program, it must run reliably in the background, we need to make it daemon. It is better to monitor the process status and automatically restart it at the end of an accident. The supervisor is a set of common process management programs developed using Python. It can change a common command line process to a daemon in the background and monitor the process status. It can automatically restart upon abnormal exit. Install supervisorDebian/Ubuntu directly through apt: [html] # apt-get install supervisor. Then, write a configuration file for our self-developed application to allow the supervisor to manage it. The configuration files of each process can be split separately and placed in/etc/supervisor/conf. d/directory. conf as the extension, for example, app. conf defines a gunicorn process: [html] [program: app] command =/usr/bin/gunicorn-w 1 wsgiapp: application directory =/srv/www user = www-data where the process app is defined in [program: app], command is a command, and directory is the current directory of the process, user is the identity of the user who runs the process. Restart the supervisor to make the configuration file take effect. Then run the supervisorctl command to start the process: [html] # supervisorctl start app to stop the process: [html] # supervisorctl stop app if you want to use variables in the command line, you need to write a shell script: [html] #! /Bin/sh/usr/bin/gunicorn-w 'grep-c ^ processor/proc/cpuinfo' wsgiapp: application and then add the x permission, point the command to the shell script.