monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check the age of a process


From: Lutz Mader
Subject: Re: Check the age of a process
Date: Thu, 22 Aug 2019 08:29:56 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hello Dave,
a process uptime test ist available, see
https://mmonit.com/monit/documentation/monit.html#UPTIME-TEST

The uptime test is availabel for the process and system service
definitions only.

> Example of restarting the process every three days:
>
>  check process myapp with pidfile /var/run/myapp.pid
>     start program = "/etc/init.d/myapp start"
>     stop program = "/etc/init.d/myapp stop"
>     if uptime > 3 days then restart

With regards,
Lutz

p.s.
The test is available since some years (I find the test in Monit 5.16).
Check the used Monit version with the command "monit -V".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]