Горячая линия Embedded System Rus:8-800-775-06-34 (звонок по России бесплатный)

LM5_N
LM-Wall_N
DALI_N
Vita_N

Автоматический мониторинг системных процессов в LogicMachine

Пример: Автоматический мониторинг системных процессов в LogicMachine

Программа

Мы очень рекомендуем добавить эту программу в раздел Network Configuration –> Services –> System monitoring

# check once in 2 minutes
set daemon 120
# reboot system when memory or cpu usage is too high
check system $HOST
if cpu usage (user) > 90% for 15 cycles then exec "/sbin/reboot"
if memory usage > 90% for 5 cycles then exec "/sbin/reboot"
# http server
check process uhttpd with pidfile /var/run/uhttpd_httpd.pid
start program = "/etc/init.d/httpd restart"
stop program = "/etc/init.d/httpd stop"
if failed port 80 with timeout 15 seconds then restart
# knx backend
check process eibd with pidfile /var/run/eibd
start program = "/etc/init.d/eibd restart"
stop program = "/etc/init.d/eibd stop"
if 5 restarts within 5 cycles then timeout
# knx monitor
check process groupmonitor with pidfile /var/run/gs-groupmonitor.pid
start program = "/etc/init.d/genohm-scada restart"
stop program = "/etc/init.d/genohm-scada stop"
if 5 restarts within 5 cycles then timeout