Xymon Mailing List Archive search

INTERVAL in clientlaunch.cfg

6 messages in this thread

list Jeff Newman · Wed, 18 Jan 2006 22:33:15 -0600 ·
Hi,

Question about the INTERVAL setting in clientlaunch.cfg:

Per the man page (for hobbitlaunch.cfg)

The *INTERVAL* keyword defines how often this command is executed. {...}
Intervals can be specified in seconds (if you just put a number there), or
in minutes (5m), hours (2h), or days (1d).

So I was trying to get netstat -s working every second. This should be
possible with the client script:

#!/bin/sh
        netstat -s > /tmp/hiflow_net.txt
        $BB $BBDISP "status $MACHINE.HiFlowNet green `date`
        `cat /tmp/hiflow_net.txt`
        "

        exit 0

Measuring the time it takes for this to complete:

# time hiflow_net

 real    0m0.04s
user    0m0.00s
sys     0m0.01s

Running every second is workable.

Following the man page, I did the following with my clientlaunch.cfg:

[client]
        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
        CMD $HOBBITCLIENTHOME/bin/hobbitclient.sh
        LOGFILE $HOBBITCLIENTHOME/logs/hobbitclient.log
        INTERVAL 5m

[hiflow_net]
        ENVFILE /usr/local/hobbit/client/etc/hobbitclient.cfg
        CMD /usr/local/hobbit/client/ext/hiflow_net
        LOGFILE=/tmp/hilog
        INTERVAL 1

The data does arrive at the hobbit server, however, not every second. I get
a weird behavior from hobbit.
I did a:

while true; do
ps -ef | grep netstat | grep -v grep
done

And this is what I see:

hobbit 70112 24322   0 23:30:53      -  0:00 [netstat]
  hobbit 57350 15788   1 23:31:03      -  0:00 netstat -s
  hobbit 28558 63650   0 23:31:08      -  0:00 [netstat]
  hobbit 14486 23038   0 23:31:18      -  0:00 [netstat]
  hobbit 16646 60686   0 23:31:33      -  0:00 netstat -s
  hobbit 28568 64464   0 23:31:43      -  0:00 [netstat]
  hobbit 20928 63544   1 23:31:53      -  0:00 netstat -s
  hobbit 53638 58900   0 23:31:58      -  0:00 [netstat]
  hobbit 64280 14410   0 23:32:03      -  0:00 netstat -s

Any thoughts (Besides the running debate on the need for 1 second vs 5
minute periods)?

-Jeff
list Henrik Størner · Thu, 19 Jan 2006 07:21:33 +0100 ·
quoted from Jeff Newman
On Wed, Jan 18, 2006 at 10:33:15PM -0600, Jeff Newman wrote:
Question about the INTERVAL setting in clientlaunch.cfg:

Per the man page (for hobbitlaunch.cfg)

The *INTERVAL* keyword defines how often this command is executed. {...}
Intervals can be specified in seconds (if you just put a number there), or
in minutes (5m), hours (2h), or days (1d).

So I was trying to get netstat -s working every second.

[hiflow_net]
        ENVFILE /usr/local/hobbit/client/etc/hobbitclient.cfg
        CMD /usr/local/hobbit/client/ext/hiflow_net
        LOGFILE=/tmp/hilog
        INTERVAL 1
hobbitlaunch has a built-in safety catch, so you cannot run a
task more often than once every 5-10 seconds. That's to prevent
it from fork-bombing your system.

If you really need that, use a wrapper around your script:

   #!/bin/sh

   while 1
   do
       /usr/local/hobbit/client/ext/hiflow_net
       sleep 1
   done

and run the wrapper-script from hobbitlaunch (without any
INTERVAL setting since it keeps running).


Henrik
list Jeff Newman · Thu, 19 Jan 2006 01:29:52 -0600 ·
Hi,

Well, Im getting data every second now so thats good.

I was trying to just get all the same data as netstat, but for some reason,
the rrd is
only populated by "echo". im guessing because in the output from netstat -s,
echo
is the only thing that has name: number (this is an AIX box BTW) so how
is hobbit doing it normally then for the rrd on the other side to work
correctly?

-Jeff
quoted from Henrik Størner


On 1/19/06, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Wed, Jan 18, 2006 at 10:33:15PM -0600, Jeff Newman wrote:
Question about the INTERVAL setting in clientlaunch.cfg:

Per the man page (for hobbitlaunch.cfg)

The *INTERVAL* keyword defines how often this command is executed. {...}
Intervals can be specified in seconds (if you just put a number there),
or
in minutes (5m), hours (2h), or days (1d).

So I was trying to get netstat -s working every second.

[hiflow_net]
        ENVFILE /usr/local/hobbit/client/etc/hobbitclient.cfg
        CMD /usr/local/hobbit/client/ext/hiflow_net
        LOGFILE=/tmp/hilog
        INTERVAL 1
hobbitlaunch has a built-in safety catch, so you cannot run a
task more often than once every 5-10 seconds. That's to prevent
it from fork-bombing your system.

If you really need that, use a wrapper around your script:

  #!/bin/sh

  while 1
  do
      /usr/local/hobbit/client/ext/hiflow_net
      sleep 1
  done

and run the wrapper-script from hobbitlaunch (without any
INTERVAL setting since it keeps running).


Henrik

list Shadow Azul · Thu, 17 Jun 2010 15:04:54 -0300 ·
Hello, I have Xymon 4.3.0-0.beta2 installed under solaris (server and
client). I am trying to configure a new test with 10 minutes of interval
(10m). I try several INTERVALS in clientlaunch.cfg but doesnt work ( I try
5m, 7m, 10m, etc). All tests do not respect INTERVAL sentence.

Here my configuration:

[cont]
        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
        CMD $HOBBITCLIENTHOME/ext/bb-contenedor.sh
        LOGFILE $HOBBITCLIENTHOME/logs/bb-contenedor.log
        INTERVAL 10m

Any Idea? Thanks a Lot !
* <http://hobbitmon.sourceforge.net/>*
list Asif Iqbal · Thu, 17 Jun 2010 16:27:20 -0400 ·
quoted from Shadow Azul
On Thu, Jun 17, 2010 at 2:04 PM, Shadow Azul <user-43aa3af8ddac@xymon.invalid> wrote:
Hello, I have Xymon 4.3.0-0.beta2 installed under solaris (server and
client). I am trying to configure a new test with 10 minutes of interval
(10m). I try several INTERVALS in clientlaunch.cfg but doesnt work ( I try
5m, 7m, 10m, etc). All tests do not respect INTERVAL sentence.
may be bb-contenedor.sh takes longer than 10  mins to finish ?

what does your logfile bb-contenedor.log say ?

does this run ok?

 ./bin/bbcmd --env=/path/to/hobbitserver.cfg ext/bb-contenedor.sh
quoted from Shadow Azul

Here my configuration:

[cont]
        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
        CMD $HOBBITCLIENTHOME/ext/bb-contenedor.sh
        LOGFILE $HOBBITCLIENTHOME/logs/bb-contenedor.log
        INTERVAL 10m

Any Idea? Thanks a Lot !
-- 

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
list Shadow Azul · Thu, 17 Jun 2010 18:39:34 -0300 ·
I supose that is a bug, in the previous stable version runs fine !!! The
script only takes 3 segs to run...  but runs erratically, in some times run
at 1 or 2 minutes or 1 seg, not peridiocally...
Its a new installation without customized !  Do you test the time in your
client ???  Please, try it... I have Xymon 4.3.0-0.beta2  version !!!

Thanks a lot !
2010/6/17 Asif Iqbal <user-6f4b51ac2a40@xymon.invalid>
quoted from Shadow Azul
On Thu, Jun 17, 2010 at 2:04 PM, Shadow Azul <user-43aa3af8ddac@xymon.invalid> wrote:
Hello, I have Xymon 4.3.0-0.beta2 installed under solaris (server and
client). I am trying to configure a new test with 10 minutes of interval
(10m). I try several INTERVALS in clientlaunch.cfg but doesnt work ( I
try
5m, 7m, 10m, etc). All tests do not respect INTERVAL sentence.
may be bb-contenedor.sh takes longer than 10  mins to finish ?

what does your logfile bb-contenedor.log say ?

does this run ok?

 ./bin/bbcmd --env=/path/to/hobbitserver.cfg ext/bb-contenedor.sh

Here my configuration:

[cont]
        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
        CMD $HOBBITCLIENTHOME/ext/bb-contenedor.sh
        LOGFILE $HOBBITCLIENTHOME/logs/bb-contenedor.log
        INTERVAL 10m

Any Idea? Thanks a Lot !
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?