<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2>After even more testing, it only works SOMETIMES.  
:-(</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2>The "logfile" section in the clientlog always shows 
the file with correct timestamps.  But the "msgs" section only 
occassionally shows the contents of the file.  Usually it doesn't.  I 
verified the file is being created and has content (all ASCII text, about 300 
bytes).  I was logged into the server looking manually when the Hobbit 
client ran.  The file was recreated with a new timestamp (the actual 
contents typically don't change - which is normal for what I'm monitoring 
here).  Even though I see the file with new timestamps and valid contents, 
those contents don't always make it up to the Hobbit server, but the file's 
metadata always does.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2>Here's the entry from client-local.cfg that runs the 
script:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2>######################</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff 
size=2>[skmsp01]<BR>file:/var/log/mail_statistics<BR>log:/var/adm/messages:10240<BR>log:`/home/a/prems/hobbit/helper_scripts/dirMon.ksh 
2>&1 >/tmp/dirMon.out; echo /tmp/dirMon.out`:1000</FONT></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff size=2><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2>######################</FONT></SPAN></DIV>
<DIV dir=ltr align=left><BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2>And here's what shows up in the relevent sections of 
clientlog (the msgs section being blank):</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><FONT face=Arial 
color=#0000ff size=2>######################</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=059021620-09062007><PRE><FONT face=Arial color=#0000ff>[msgs:/tmp/dirMon.out]

[logfile:/tmp/dirMon.out]
type:100000 (file)
mode:640 (-rw-r-----)
linkcount:1
owner:14171 (prems)
group:14171 (prems)
size:302
clock:1181419858 (2007/06/09-14:10:58)
atime:1181419858 (2007/06/09-14:10:58)
ctime:1181419856 (2007/06/09-14:10:56)
mtime:1181419856 (2007/06/09-14:10:56)</FONT></PRE></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2>######################</FONT></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2>Here's details on a typical /tmp/dirMon.out 
file:</FONT></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><FONT 
face=Arial color=#0000ff 
size=2>######################</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><FONT 
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><FONT 
face=Arial color=#0000ff size=2>skmsp01 /tmp > ls -l 
/tmp/dirMon.out<BR>-rw-r-----   1 prems    
prems        302 Jun  9 14:20 
/tmp/dirMon.out<BR>skmsp01 /tmp > cat 
/tmp/dirMon.out<BR>ReplicaDn   
Consumer                  
Supplier                  
Delay<BR>o=domain.com skmsp02.eng.domain.com:389 skmsp01.eng.domain.com:389 
0<BR>ReplicaDn   
Consumer                  
Supplier                  
Delay<BR>o=domain.com skmsp01.eng.domain.com:389 skmsp02.eng.domain.com:389 
0<BR>skmsp01 /tmp ></FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><FONT 
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2>######################</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff size=2>The hobbit client 
runs as userid 'prems', so everything looks to have adequate 
permissions.</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff size=2>Any ideas on how 
to make this work reliably?  I tried adding a 2 second sleep right before 
the echo in the log: entry in client-local.cfg.  I didn't really expect 
that to help, and it didn't.</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=059021620-09062007><SPAN class=059021620-09062007><SPAN 
class=059021620-09062007><FONT face=Arial color=#0000ff size=2>Thanks in advance 
for any ideas!</FONT></SPAN></SPAN></SPAN></DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Haertig, David F (Dave) 
[mailto:haertig@avaya.com] <BR><B>Sent:</B> Friday, June 08, 2007 6:36 
PM<BR><B>To:</B> hobbit@hswn.dk<BR><B>Subject:</B> RE: [hobbit] How to run an 
arbitary script on the client end?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=047103400-09062007><FONT face=Arial 
color=#0000ff size=2>Actually, on furhter testing, it DID 
work!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=047103400-09062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=047103400-09062007><FONT face=Arial 
color=#0000ff size=2>It just takes quite a while to show up.  I run the 
client scripts on the standard 5 minute interval, so I gave it two cycles plus 
(about 12 minutes) during my testing - and nothing showed up in that 
interval.  I walked away and about 25 minutes later came back and found my 
data in the clientlog.  Yeah!</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Charles Jones [mailto:jonescr@cisco.com] 
<BR><B>Sent:</B> Friday, June 08, 2007 3:45 PM<BR><B>To:</B> 
hobbit@hswn.dk<BR><B>Subject:</B> Re: [hobbit] How to run an arbitary script on 
the client end?<BR></FONT><BR></DIV>
<DIV></DIV>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 content="MSHTML 6.00.2900.3059" name=GENERATOR>
  <DIV dir=ltr align=left><SPAN class=937423921-08062007><FONT face=Arial 
  color=#0000ff 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 face=Arial 
  color=#0000ff 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 lang=en-us dir=ltr align=left>
  <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 face=Arial 
  color=#0000ff 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 face=Arial 
  color=#0000ff size=2>Add to client-local.cfg</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=203360521-08062007><FONT face=Arial 
  color=#0000ff 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 face=Arial 
  color=#0000ff 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 lang=en-us dir=ltr align=left>
  <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 
    class=moz-txt-link-rfc2396E href="file:path_to_file" 
    moz-do-not-send="true">"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>