linux – 将monit用于不作为守护进程后台/运行的进程

我正在使用montit来运行我需要运行的其他进程,但我有一个不作为守护进程运行的进程,我无法弄清楚如何用monit监视它

解决方法

当前版本的monit允许您使用匹配的“string”指令而不是PID来匹配进程字符串…
check process n2n-edge
        matching "/usr/sbin/edge"
        start program = "/root/tools/edge.87.server"
        stop program = "/usr/bin/killall edge"
        if 10 restarts within 11 cycles then timeout
        if cpu usage > 95% for 11 cycles then restart

相关文章

1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...
1 删除0字节文件 find -type f -size 0 -exec rm -rf {} ...
## 步骤 1:安装必要的软件包 首先,需要确保系统已安装 `dh...