[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
monit '-i' option?
From: |
Martin Pala |
Subject: |
monit '-i' option? |
Date: |
Sat, 13 Sep 2003 20:25:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4 |
Hi,
i don't understand validate option '-i'. It is documented as:
-i Validate mode, startup in validate mode
The only thing which it does if specified is to set Run.validate flag:
---
static void handle_options(int argc, char **argv) {
...
case 'i':
Run.validate= TRUE;
break;
...
}
---
And the only place where it is used is in do_default() function, which
is runned if no specific command (action like "start all", "validate",
etc.) was defined on the command line and that monit is running in
daemon mode:
---
static void do_default() {
if(Run.isdaemon) {
...
for(;;) {
if(Run.validate != TRUE) {
validate();
} else {
Run.validate= FALSE;
}
...
} else {
validate();
}
...
}
---
As you can see, the resulting behavior is, that in the case that monit
is running in daemon mode (and '-i' option was specified), it will ommit
first validate cycle, set Run.validate=FALSE (which is equal to the case
where no '-i' option was specified) and next cycle it starts validate()
as usual.
I think '-i' option is broken - the behavior is strange. I don't know -
maybe it is some forgotten option before 'validate' command was introduced.
If there is no reason for it, i propose to remove it from 4.0 and
simplify the do_default() function to run validate() in daemon mode in
all cases - instead of:
---
if(Run.validate != TRUE) {
validate();
} else {
Run.validate= FALSE;
}
---
just:
---
validate();
---
Martin
- monit '-i' option?,
Martin Pala <=
- Re: monit '-i' option?, Jan-Henrik Haukeland, 2003/09/14
- Re: monit '-i' option?, Christian Hopp, 2003/09/14
- Re: monit '-i' option?, Rory Toma, 2003/09/15
- Re: monit '-i' option?, Martin Pala, 2003/09/15
- Re: monit '-i' option?, Jan-Henrik Haukeland, 2003/09/15
- Re: monit '-i' option?, Rory Toma, 2003/09/15
- Re: monit '-i' option?, Jan-Henrik Haukeland, 2003/09/15
- Re: monit '-i' option?, Jan-Henrik Haukeland, 2003/09/15
- Re: monit '-i' option?, Jan-Henrik Haukeland, 2003/09/15
- Re: monit '-i' option?, Rory Toma, 2003/09/15