monit-general
[Top][All Lists]
Advanced

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

Re: Basic q's abt monit 4.5.1


From: Martin Pala
Subject: Re: Basic q's abt monit 4.5.1
Date: Tue, 20 Sep 2005 10:20:05 +0200
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

anuj agrawal wrote:
I am talking abt a situation in which suppose the
process is running and monit is monitoring it....now i
try to restart the process through monit GUI by
pressing the "restart" button provided.In this case
whats the sequence of events which happen??

Monit will:
- call stop method defined in monitrc by 'stop program ...'
- wait for process to stop or timeout
- call start method defined in monitrc by 'start program ...'
- wait for process to start or timeout

When waiting for process to start, monit reads the pid from related file and checks whether the process is running or not.


This is the situation where im facing problems....as u
already know that my application doesnt generate a pid
file...i had manually created one for monit to
recognise it...hence it could monitor it easily...but
now when i try to restart the process through monit it
gives "execution failed".

I know that appending a line such as "pgrep myprocess

..." to the application code would do..but for some

reasons i cant do it now.

The pidfile is mandatory for monit process monitoring


Does monit look for the pid file first and then goes
on to execute the "start" method...or it does the
"start" and then the new pid is placed in the already
existing pid file?

the start method is responsible for updating the pidfile

In short does monit have the capability to start a
process through itself when the user presses the
"start" button given that it doesnt have the pid of
the process??

As described above - the start method is responsible for starting the process and updating the pidfile. Monit itself don't start the monitored programs directly.

Martin






reply via email to

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