Help: use monit to monitor a process doesn't work
Hi, sometimes my dhclient process could die without clue, don't know where the log file is.
so i want to use monit to restart dhclient. This is what i added to /etc/monit/monitrc. For testing, i'm called echo initially, when eth0's pid file is gone. check process dhclient with pidfile /var/run/sendsigs.omit.d/network-manager.dhclient-eth0.pid start program = "/bin/echo dhclient died, do something ..." but nothing happened after 2 mins (i set in monitrc to check it every 2 mins) Any suggestions ? |
Something like this?
Code:
#!/bin/bash |
All times are GMT -5. The time now is 03:01 AM. |