<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">All,<br>
      <br>
      Apologies on not responding to this.<br>
      <br>
      The existing XymonPSClient works just fine running its own
      scheduling. For the most part it also seems to be well behaved and
      not leak memory - it is fairly proactive about explicit garbage
      collection. On first run it gathers a number of data items from
      WMI on a much longer refresh cycle and reports them as part of the
      client report - these items are fairly slow to report and don't
      change much if at all. While that could be handled by saving and
      restoring state between runs and using a Scheduled task rather
      than service runner, it makes things more complicated. Also need
      to consider measures to prevent multiple instances running if
      Scheduled tasks fire up when the previous one is still running -
      for example doing the refresh of the long refresh cycle WMI info
      (maybe there's an in-built mechanism for this?).<br>
      <br>
      External scripts however are much more problematic to manage
      scheduling for, and using scheduled tasks could be a much better
      way to handle them.<br>
      <br>
      David.<br>
    </div>
    <blockquote
cite="mid:135DD93F19DFE347BC300E008E6744BC7624024D@MCKEXCH01.ena.us.experian.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D">I’m very interested on WinPSClient
            too. I’m planning to install it on a series of servers that
            we will be configuring in the next few weeks.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D">I second the idea of using Windows
            Task Scheduler.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D">Has there been any thought on how
            to enable creating extensions? It could be like what’s done
            in Unix, or copy what’s done in BBWin.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D">Thanks!<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D">glauber<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:"Courier
            New";color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                Xymon [<a class="moz-txt-link-freetext" href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
                <b>On Behalf Of </b>Shea, Graeme A<br>
                <b>Sent:</b> Thursday, November 14, 2013 14:31<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
                <b>Subject:</b> Re: [Xymon] WinPSClient - Updates?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">What if instead of “wrapping” a service around
            it the script ran as a scheduled task every 5 minutes?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">For the task properties the command line
            becomes something like
            C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">And the argument &'C:\Path_To_Client\</span><span
            lang="EN-AU">
          </span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">XymonPSClient.ps1'
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">Put a tick in repeat task, set the period to 5
            mins and the duration to indefinably. Probably no need to
            save the password.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">The task can be exported as an xml file for
            import into other systems and/or included in the
            distribution package.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">Regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU">Graeme<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-AU"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                Xymon [<a moz-do-not-send="true"
                  href="mailto:xymon-bounces@xymon.com">mailto:xymon-bounces@xymon.com</a>]
                <b>On Behalf Of </b>David Baldwin<br>
                <b>Sent:</b> Wednesday, 13 November 2013 3:55 PM<br>
                <b>To:</b> Jason Richards Pagh; <a
                  moz-do-not-send="true" href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
                <b>Subject:</b> [Xymon] Re: WinPSClient - Updates?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><span lang="EN-AU">Jason,<br>
              <br>
              Thanks for the email.<o:p></o:p></span></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal"><span lang="EN-AU">So it looks like the
                WinPSClient hasn’t been updated in a few months. I had
                seen a thread from quite a while ago about some issues
                David was running into, but can’t tell if he’s still
                around and willing/able to work on it.<o:p></o:p></span></p>
          </div>
          <div>
            <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
          </div>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            lang="EN-AU">In principle I am interested, but don't have a
            lot of time to work on it at present.<o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span lang="EN-AU">I’ve been able to get
              XymonPSClient.exe (aka SrvAny) to run powershell natively
              as a 64-bit executable. The only change necessary to
              enable this was changing the PowerShell executable to
              running as
              %windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe.
              The sysnative portion prevents a 32-bit program (SrvAny)
              from being redirected to %windir%\SysWow64. (See <a
                moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx</a>).<o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
        </div>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            lang="EN-AU">Thanks - I found the "sysNative" workaround a
            month or two ago also. Very useful for running PS scripts
            from BBWin since it is still 32-bit only.<o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span lang="EN-AU">I also found a better
              service wrapper than SrvAny, namely nssm (<a
                moz-do-not-send="true" href="http://nssm.cc">http://nssm.cc</a>/).
              This has the ability to detect if powershell fails and
              restart it, which is something SrvAny lacks. It also comes
              in both 32-bit and 64-bit versions, so when using the
              latter the sysnative piece isn’t necessary. I’ve only been
              working at this for a day or two, so it probably needs
              more testing, but it looks promising.<o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
        </div>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            lang="EN-AU">That's an awesome improvement. Definitely a big
            advance :)<o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span lang="EN-AU">Is there any work
              (design contemplation) about how xymonclient.ps1 could
              handle external scripts? I assume this was just a future
              phase and not so much a limitation or barrier that hadn’t
              yet been overcome.<o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
        </div>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            lang="EN-AU">I'd played around with things like start-job in
            PS, but I hadn't worked through all of the legacy reporting
            mechanisms from BBNT/BBWin (e.g. writing text files into
            directory - that's an easy one in practice) but more to the
            point worked out throttling mechanisms for long-running
            scripts that don't exit, etc. Had also considered just
            running external scripts as scheduled tasks, but not had
            time to investigate.<br>
            <br>
            From memory there were some other issues such as dealing
            with memory leaks (periodic service restart would solve
            that).<br>
            <br>
            David.<o:p></o:p></span></p>
        <pre><span lang="EN-AU">-- <o:p></o:p></span></pre>
        <pre><span lang="EN-AU">David Baldwin - Senior Systems Administrator (Datacentres + Networks)<o:p></o:p></span></pre>
        <pre><span lang="EN-AU">Information and Communication Technology Services<o:p></o:p></span></pre>
        <pre><span lang="EN-AU">Australian Sports Commission          <a moz-do-not-send="true" href="http://ausport.gov.au">http://ausport.gov.au</a><o:p></o:p></span></pre>
        <pre><span lang="EN-AU">Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616<o:p></o:p></span></pre>
        <pre><span lang="EN-AU"><a moz-do-not-send="true" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>          Leverrier Street Bruce ACT 2617<o:p></o:p></span></pre>
        <p class="MsoNormal"><span lang="EN-AU"><o:p> </o:p></span></p>
        <div class="MsoNormal" style="text-align:center" align="center"><span
            lang="EN-AU">
            <hr align="center" size="2" width="100%">
          </span></div>
        <p class="MsoNormal"><span lang="EN-AU">Keep up to date with
            what's happening in Australian sport visit
            <a moz-do-not-send="true" href="http://www.ausport.gov.au">www.ausport.gov.au</a>
            <br>
            <br>
          </span><span
style="font-size:7.5pt;font-family:"Arial","sans-serif""
            lang="EN-AU">This message is intended for the addressee
            named and may contain confidential and privileged
            information. If you are not the intended recipient please
            note that any form of distribution, copying or use of this
            communication or the information in it is strictly
            prohibited and may be unlawful. If you receive this message
            in error, please delete it and notify the sender.</span><span
            lang="EN-AU">
            <o:p></o:p></span></p>
        <div class="MsoNormal" style="text-align:center" align="center"><span
            lang="EN-AU">
            <hr align="center" size="2" width="100%">
          </span></div>
        <p><b><span lang="EN-AU">Important - </span></b><span
            lang="EN-AU">This email and any attachments may be
            confidential. If received in error, please contact us and
            delete all copies. Before opening or using attachments check
            them for viruses and defects. Regardless of any loss, damage
            or consequence, whether caused by the negligence of the
            sender or not, resulting directly or indirectly from the use
            of any attached files our liability is limited to
            resupplying any affected attachments. Any representations or
            opinions expressed are those of the individual sender, and
            not necessarily those of the Department of Education and
            Early Childhood Development.<o:p></o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
David Baldwin - Senior Systems Administrator (Datacentres + Networks)
Information and Communication Technology Services
Australian Sports Commission          <a class="moz-txt-link-freetext" href="http://ausport.gov.au">http://ausport.gov.au</a>
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
<a class="moz-txt-link-abbreviated" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>          Leverrier Street Bruce ACT 2617
</pre>
  </body>
</html>