monit-general
[Top][All Lists]
Advanced

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

[Patch] Revised resource-support [aka. "proc"-support]


From: Christian Hopp
Subject: [Patch] Revised resource-support [aka. "proc"-support]
Date: Fri, 9 Aug 2002 18:21:59 +0200 (CEST)

Hello everyone!

I have attached a revised version of the code.  The patch is against
todays cvs.

The following things have happened:

1) preliminary FreeBSD support... sorry but I don't know if it would
   even compile.  It uses kvm and it's pure copy paste from (I gonna hear
   a lot of "I TOLD YOU!!!") libgtop.  I haven't found anything else
   which is helpful. )-:  PLEASE, could somebody test and fix it. (-:

2) Monit integration has changed... a resource list is defined to
   check MEM%/MEMkB/CPU%.  It is handled like any other list in monit.
   Thus, the syntax has changed, e.g.:

check foo-inet with pidfile /var/run/foo_daemon.pid
    # long version
    if memusage greater 10.0 for 2 cycles
    if memkbyte greater 2000 for 2 cycles
    # short version
    cpuusage 10.0 3

3) Zombie check environment changed... the zombie check is separated
   as check_process_state(p).  Thus, we can add other states and it is
   actually no resource.

4) Counter system included... that means we define a max number of
   cycles.  If the resource limit is exceed a counter is raised by 1, if
   not it is lowered by 1 (but not below 0).  If the max number of
   cycles is reached the service is restarted.  Then all counters of
   the service are set back to zero.

5) New syntax filling words... "greater" and "for"

It seems to run on my Solaris 7 box quite well.  But I would still
consider it alpha. (-:

To Do:

1) Alarm integration... clear, or?

2) Renaming proc_interface* to resource_* and changing function names
   to make clear that it's not procfs dependent.

3) Web interface support (maybe with all the nice performance statistics)

4) Tidying up validate.c (and all the debug stuff)

5) Something to turn of the feature. (-:

6) Docs. )-:

7) Last but not least... excessive testing (esp. performance).

Remaining quirks:

1) Solaris still needs uid=0, FreeBSD most properly will, Linux just
   if proc has stricter permissions (I think with openwall patch).

2) ...

Happy reading,

Christian


-- 
Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
Technische Universität Clausthal                         fax: +49-5323-72-3197
  pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/chopp.key.asc  (2001-11-22)

Attachment: monit_proc_prelim2.tar.gz
Description: Binary data


reply via email to

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