monit-dev
[Top][All Lists]
Advanced

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

Re: device stuff - cvs


From: Jan-Henrik Haukeland
Subject: Re: device stuff - cvs
Date: 10 Jun 2003 23:53:55 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Christian Hopp <address@hidden> writes:

> On Mon, 9 Jun 2003, Martin Pala wrote:
> 
> > I though yet about one topic - it is possible to consolidate syntax of
> > resource checks with syntax of device style, for example:
> >
> >   "if cpuusage is greater than 60.0 for 2 cycles then alert" -> "if cpu
> > usage > 60 % for 2 cycles then alert"
> >
> >   "if memkbyte > 100000.0 for 5 cycles then stop" -> "if memory usage >
> > 100 MB for 5 cycles then stop"
> >
> >   "if memusage > 10.0 for 5 cycles then stop" -> "if memory usage > 10 %
> > for 5 cycles then stop"
> >
> > It is probably more simple i think (it is sufficient to have just 'cpu'
> > and 'mem(ory)' statements instead of present 'cpuusage', 'memkbyte' and
> > 'memusage'). What about it?
> 
> Good idea... the memusage/memkbytes came because of laziness. (-:
> 
> I have prepared new code for p.y/l.l with the syntax,
> 
> IF MEM(ORY) <operator> <int|real> <unit|%> [<int>] <action>
> 
> IF CPU <operator> <int|real> % [<int>] <action>
> 
> IF CHILD(REN) <operator> <int> [<int>] <action>

One question, what does this mean :) Does it mean that if a process
has e.g. more than X children then -> action?

> IF TOTALMEM(ORY) <operator> <int|real> <unit|%> [<int>] <action>
> 
> the old syntax is still available but you get a warning that it is
> obsolete.
> 
> If its okay I can sync it... what about the others?

Yes, please, do sync. I thought I should wait until last to add my
stuff (alert command, timestamp extension) and then run a QA on the
codebase before preparing a release. (For instance the code does not
compile on my RH7.3 after Martin's major patch :).

> We can leave the old syntaxes till 4.0.  

The next release, that is, this release _is_ going to be 4.0. At least
I think we agreed upon this, didn't we?  Since it contains a whole new
functionality branch with device check++ and language
changes/extensions[1].

Anyway, I think it should be possible to deprecate the current
resource syntax for this release already because this particularry
change is slight. Simply add the same deprecation code to the parser
like we have done with for instance autostart:

autostart       : AUTOSTART {
                    YERROR("Warning: 'autostart' is deprecated - "
                           "use the 'mode' statement instead");
                  }
                ;


[1] I thought I should create the language discussion in a new thread
because it's important and should not be lost as an addendum to this
mail :)

-- 
Jan-Henrik Haukeland





reply via email to

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