我对monit相当新,我想知道这个脚本是否足以重新启动崩溃的程序让我们说program1是程序的名称.
check process program1
matching "program1"
start program = "/home/user/files/start.sh"
stop program = "/home/user/files/stop.sh"
Run Code Online (Sandbox Code Playgroud)
它现在会重启一个崩溃的程序吗?我怎样才能保证它在工作时不重启程序?
编辑:更多信息该程序使用端口30000 udp.这会让它更加谨慎吗?"周期"之间有多少秒?
if failed port 30000 type UDP for 3 cycles then restart
Run Code Online (Sandbox Code Playgroud) 我不明白我需要做什么才能使用位于/ usr/include中的库.
例如:我想使用位于/ usr/include/json中的json库.在我的项目'main.cpp'中我做到了#include <json/json.h>.
我没有得到任何错误,但当我开始使用库中的函数时,我得到未定义的引用错误.我有多个库的这个问题,我不知道该做什么我在谷歌搜索但我只遇到了模糊的答案.
我很确定我需要在CMakeLists.txt文件中做一些事情,但我不知道是什么.