runsv
A very simple watchdog application. It starts the program passed on the command line and restarts it if it dies. In order to provide more control over the restarting process, you can run another program upon failures.
一个非常简单的看门狗应用程序。它启动在命令行上传递的程序,如果它死了,它会重新启动它。为了更好地控制重新启动过程,您可以在失败时运行另一个程序。

http://smarden.org/runit/runsv.8.html

Name

runsv - starts and monitors a service and optionally an appendant log service
启动并监视服务以及附加日志服务(可选)

Synopsis 概要

runsv service

Description

命令行启动

runsv启动程序

image.png

-s 5 表示进程结束到再次重启进程的时间间隔是5s

image.png