INTERVAL in clientlaunch.cfg
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
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
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
On 1/19/06, Henrik Stoerner <henrik at hswn.dk> 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
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
participants (2)
-
henrik@hswn.dk
-
jeffnewman75@gmail.com