<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Heh, I'm guessing Henrik included some sort of sanitizing of the log
directive so that you couldn't do things like that.<br>
<br>
Haertig, David F (Dave) wrote:
<blockquote
cite="mid:9836EA7D7FDAE34099AED87A2D9C3A8D223016@306181ANEX2.global.avaya.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.3059" name="GENERATOR">
<div dir="ltr" align="left"><span class="937423921-08062007"><font
color="#0000ff" face="Arial" size="2">Hmmm... Didn't seem to like my
first test attempt (see below). Nothing showed up in my clientlog.</font></span></div>
<div dir="ltr" align="left"><span class="937423921-08062007"></span> </div>
<div dir="ltr" align="left"><span class="937423921-08062007"><font
color="#0000ff" face="Arial" size="2">[skmsp01]<br>
<a class="moz-txt-link-freetext" href="file:/var/log/mail_statistics">file:/var/log/mail_statistics</a><br>
log:/var/adm/messages:10240<br>
log:`/tmp/dirMon.ksh 2>&1 >/tmp/dirMon.log; echo
/tmp/dirMon.log`<br>
</font></span></div>
<br>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Haertig,
David F (Dave) [<a class="moz-txt-link-freetext" href="mailto:haertig@avaya.com">mailto:haertig@avaya.com</a>] <br>
<b>Sent:</b> Friday, June 08, 2007 3:13 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a><br>
<b>Subject:</b> RE: [hobbit] How to run an arbitary script on the
client end?<br>
</font><br>
</div>
<div dir="ltr" align="left"><span class="203360521-08062007"><font
color="#0000ff" face="Arial" size="2">Thanks. Your suggestion
triggered an idea on how to do this. client-local.cfg supports
backticks to run a program to generate a logfile name dynamically. So
I'll try to make use of that and do something like this (haven't tested
it yet):</font></span></div>
<div dir="ltr" align="left"><span class="203360521-08062007"></span> </div>
<div dir="ltr" align="left"><span class="203360521-08062007"><font
color="#0000ff" face="Arial" size="2">Add to client-local.cfg</font></span></div>
<div dir="ltr" align="left"><span class="203360521-08062007"><font
color="#0000ff" face="Arial" size="2">================</font></span></div>
<div dir="ltr" align="left"><span class="203360521-08062007"></span> </div>
<div dir="ltr" align="left"><span class="203360521-08062007"><font
color="#0000ff" face="Arial" size="2">log:`/path/to/the/program
2>&1 1>/path/to/the/logfile; echo /path/to/the/logfile`</font></span></div>
<div> </div>
<div><span class="203360521-08062007"></span><font face="Arial"><font
color="#0000ff"><font size="2">I<span class="203360521-08062007">f
this exact syntax won't work, it should be easy to use some similar
concept. The built-in backtick processing of the log: directive being
the key point.</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span
class="203360521-08062007"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span
class="203360521-08062007">Thanks!</span></font></font></font></div>
<div><br>
</div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Charles
Jones [<a class="moz-txt-link-freetext" href="mailto:jonescr@cisco.com">mailto:jonescr@cisco.com</a>] <br>
<b>Sent:</b> Friday, June 08, 2007 2:49 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</a><br>
<b>Subject:</b> Re: [hobbit] How to run an arbitary script on the
client end?<br>
</font><br>
</div>
As far as I know there is no built-in functionality to dynamically
execute remote scripts and get their output. Others may have better
suggestions, but one way of doing it, is you could set the client-side
script to be launched by the hobbit client every X minutes, (via
clientlaunch.cfg). I'm not sure of the best way to get the script
output back to the hobbit server though. I guess you could have the
script output to a logfile , and then have the hobbit server monitor
that log via the normal log monitoring mechanism<br>
. <br>
-Charles<br>
<br>
Haertig, David F (Dave) wrote:
<blockquote
cite="mid:9836EA7D7FDAE34099AED87A2D9C3A8D222F40@306181ANEX2.global.avaya.com"
type="cite">
<meta content="MSHTML 6.00.2900.3059" name="GENERATOR">
<div><font face="Arial" size="2"><span class="934245519-08062007">Is
there a way to confgure a client, via client-local.cfg or otherwise, to
run some arbitrary command on the client and send it's stdout/stderr
back to the hobbit server? I have a few simple shell scripts that
exist on some clients that it would be nice to invoke and then read
their results on the server end using the "$BBHOME/bin/bb localhost
clientlog..." method. Similar to the way a <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="file:path_to_file">"file:path_to_file"</a>
directive will collect a file's metadata? I want something like
"runprogram:path_to_program"</span></font></div>
<div><font face="Arial" size="2"><span class="934245519-08062007"></span></font> </div>
<div><font face="Arial" size="2"><span class="934245519-08062007">I
am doing this currently using a server-side script that ssh'es to the
client machine and runs what it needs. I would rather have the normal
Hobbit client collect the data output by the client-side program,
upload that, and my server-side script would parse that resulting
clientlog rather than going and collecting it's own data. If this is
possible.</span></font></div>
<div><font face="Arial" size="2"><span class="934245519-08062007"></span></font> </div>
<div><font face="Arial" size="2"><span class="934245519-08062007">Thanks!</span></font></div>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>