Supervisor¶
Supervisor est utilisé pour lancer des programmes et s'assurer qu'ils restent toujours en cours d'exécution. Si ce n'est pas le cas et qu'ils se sont arrêtés, supervisor les relance.
Utilisation¶
Supervisor dispose d'une commande interactive pour une utilisation simplifiée du service : supervisorctl.
Lors du lancement de cette commande, la liste et l'état des programmes s'affichent :
Il est ensuite possible de démarrer, d'arrêter ou de redémarrer des programmes :
supervisor> stop tika-server
tika-server: stopped
supervisor> start tika-server
tika-server: started
supervisor>
Ou d'avoir une vue d'ensemble de l'exécution de supervisor :
supervisor> maintail
06-29 14:56:21,773 INFO RPC interface 'supervisor' initialized
2021-06-29 14:56:21,775 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-06-29 14:56:21,776 INFO supervisord started with pid 1274
2021-06-29 15:17:29,365 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-06-29 15:17:29,366 INFO Included extra file "/etc/supervisor/conf.d/tika-server.conf" during parsing
2021-06-29 15:17:29,377 INFO RPC interface 'supervisor' initialized
2021-06-29 15:17:29,378 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-06-29 15:17:29,378 INFO supervisord started with pid 11961
2021-06-29 15:17:30,384 INFO spawned: 'tika-server' with pid 12050
2021-06-29 15:17:31,387 INFO success: tika-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-29 15:27:27,558 INFO waiting for tika-server to stop
2021-06-29 15:27:27,955 INFO stopped: tika-server (exit status 143)
2021-06-29 15:27:42,387 INFO spawned: 'tika-server' with pid 20259
2021-06-29 15:27:43,389 INFO success: tika-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-06-29 15:28:29,554 INFO exited: tika-server (exit status 143; not expected)
2021-06-29 15:28:30,559 INFO spawned: 'tika-server' with pid 20372
2021-06-29 15:28:31,711 INFO success: tika-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
supervisor>