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