Hobbit client external script debugging
list Pat Vaughan
How do people who run the hobbit client debugging their external scripts? With BB I usually export BBHOME and run $BBHOME/etc/bbdef.sh from my current shell and I can run my external scripts in the forground and see what they're doing. I suppose that I could change my external scripts to run every minute or two and monitor the log files, but I'd rather run them as needed while working on them. Or I could keep around a BB client for each platform that I need to tweak scripts on. Is there another option that I've overlooked?
list David Gore
From the hobbit client install: ~client/bin/bbcmd <path_to_script> Perhaps something like: client> bin/bbcmd sh -x ext/myscript.sh or client> bin/bbcmd perl -ds ext/myscript.pl David *e-mail via SUSE Linux 9.3 and other open source tools.
▸
Pat Vaughan wrote:How do people who run the hobbit client debugging their external scripts? With BB I usually export BBHOME and run $BBHOME/etc/bbdef.sh from my current shell and I can run my external scripts in the forground and see what they're doing. I suppose that I could change my external scripts to run every minute or two and monitor the log files, but I'd rather run them as needed while working on them. Or I could keep around a BB client for each platform that I need to tweak scripts on. Is there another option that I've overlooked?
list Lars Ebeling
If you read the manpages about bbcmd you find information about how use it. Regards Lars Ebeling
▸
----- Original Message -----
From: "Pat Vaughan" <user-b82f7cdf757b@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Tuesday, November 08, 2005 4:51 PM
Subject: [hobbit] Hobbit client external script debugging
How do people who run the hobbit client debugging their external scripts? With BB I usually export BBHOME and run $BBHOME/etc/bbdef.sh from my current shell and I can run my external scripts in the forground and see what they're doing. I suppose that I could change my external scripts to run every minute or two and monitor the log files, but I'd rather run them as needed while working on them. Or I could keep around a BB client for each platform that I need to tweak scripts on. Is there another option that I've overlooked?
list Pat Vaughan
AHA! I was hoping there was something stupid I overlooked! But, I'm still having a little trouble. I found that I have to export HOBBITCLIENTHOME (which is usually set in the runclient.sh script) and specify the entire path to the environment file, but I still get some errors: ./bin/bbcmd --env=/usr/lib/hobbit/client/etc/hobbitclient.cfg sh -x ext/bb-msgs.sh 2005-11-08 12:02:31 WARNING: Cannot open include file '/var/run/hobbitclient-runtime.cfg', line was:@r¸ . .... ++ /bin/cat /usr/lib/hobbit/client/tmp/MSGSTATUS.2666 + /usr/lib/hobbit/client/bin/bb-combo.sh add 'status .msgs green Tue Nov 8 11:57:50 EST 2005 All message files OK ' Usage: /usr/lib/hobbit/client/bin/bb [--debug] [--proxy=http://ip.of.the.proxy:port/] RECIPIENT DATA RECIPIENT: IP-address, hostname or URL DATA: Message to send, or "-" to read from stdin I get the same message with all of my external scripts that run normally if run from the client daemon. If I just run sh through bbcmd, I find that most of the variables I expect to see are not defined ($BBOUT, $MACHINE, $MACHINEDOTS, ect...) Thanks.
▸
From the hobbit client install: ~client/bin/bbcmd <path_to_script> Perhaps something like: client> bin/bbcmd sh -x ext/myscript.sh or client> bin/bbcmd perl -ds ext/myscript.pl David