[Xymon] help with xymonpsclient

Beck, Zak zak.beck at accenture.com
Thu Apr 23 14:58:22 CEST 2020


Hi

You did copy nssm.exe to the same location as the client script?

You could try running it without the service – this is often helpful with startup issues.

You need to start a powershell prompt with Administrator permissions – you can usually do this by using Run (Win+R) and type in powershell.exe.

Then use cd to change directory to the location where you installed the client – e.g.

cd "\program files\xymon"

and then to run the client:

.\xymonclient.ps1

You’ll a load of logging, if there are any exception messages in red you have a problem.

Cheers

Zak

From: Xymon <xymon-bounces at xymon.com> On Behalf Of Chris Pretorius
Sent: 23 April 2020 06:29
To: Timothy Williams <tlwilliams4 at vcu.edu>
Cc: xymon at xymon.com
Subject: [External] Re: [Xymon] help with xymonpsclient

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.
________________________________

Hi Timothy

Yes, the same location. I backed up the older files, deployed the new files and started the install process.

Are there any logs I can look at that can reveal why the service fails to start?
The client logs didn’t change during the install and start process.

Regards

From: Timothy Williams <tlwilliams4 at vcu.edu<mailto:tlwilliams4 at vcu.edu>>
Sent: Wednesday, 22 April 2020 20:24
To: Chris Pretorius <chrisp at lightstoneauto.co.za<mailto:chrisp at lightstoneauto.co.za>>
Cc: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: Re: [Xymon] help with xymonpsclient

Is that the same location as the older client was? Myself I use a C:\Utils folder to avoid permission issues in Program files. Xymon XML config files tell it where to create logs, etc. Make sure service has permission to create files there.

here is an excerpt of my xymonclient_config.xml:

<XymonSettings>
  <servers>xymon.xxxx.xxx</servers>
  <clientlogfile>c:\Logs\xymonclient.log</clientlogfile>
  <clientconfigfile>c:\Utils\clientconfig.cfg</clientconfigfile>
  <clientlogretain>3</clientlogretain>
  <clientfqdn>0</clientfqdn>
  <clientlower>0</clientlower>
  <clientremotecfgexec>1</clientremotecfgexec>
</XymonSettings>

Timothy L. Williams



On Wed, Apr 22, 2020 at 2:11 PM Chris Pretorius <chrisp at lightstoneauto.co.za<mailto:chrisp at lightstoneauto.co.za>> wrote:
Hi Timothy

Please ignore my previous post

I managed to get past the error and the client installed successfully.

When I run the start command I get the following error:

PS C:\Program Files\xymon> .\xymonclient.ps1 install
Service "XymonPSClient" installed successfully!
PS C:\Program Files\xymon> .\xymonclient.ps1 start
start-service : Failed to start service 'XymonPSClient (XymonPSClient)'.
At C:\Program Files\xymon\xymonclient.ps1:4139 char:60
+ ...  $xymonsvcname).Status -ne "Running") { start-service $xymonsvcname }
+                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
   ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Kind regards

From: Chris Pretorius
Sent: Wednesday, 22 April 2020 18:16
To: Timothy Williams <tlwilliams4 at vcu.edu<mailto:tlwilliams4 at vcu.edu>>
Cc: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: RE: [Xymon] help with xymonpsclient

Hi Timothy

The installation of the latest xymonclient.ps1 failed with the errors below.

The server is Window2016 server

IE version 11

Had to set the execution policy to Bypass, Setting it to remoteexecution failed


PS C:\Program Files\xymon> .\xymonclient.ps1 install
At C:\Program Files\xymon\xymonclient.ps1:28 char:19
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+                   ~
Missing file specification after redirection operator.
At C:\Program Files\xymon\xymonclient.ps1:28 char:20
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+                    ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:28 char:55
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+                                                       ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:29 char:16
+ <!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
+                ~
Missing file specification after redirection operator.
At C:\Program Files\xymon\xymonclient.ps1:29 char:20
+ <!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
+                    ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:29 char:55
+ <!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
+                                                       ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:30 char:16
+ <!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
+                ~
Missing file specification after redirection operator.
At C:\Program Files\xymon\xymonclient.ps1:30 char:20
+ <!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
+                    ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:30 char:55
+ <!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
+                                                       ~
The '<' operator is reserved for future use.
At C:\Program Files\xymon\xymonclient.ps1:31 char:16
+ <!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
+                ~
Missing file specification after redirection operator.
Not all parse errors were reported.  Correct the reported errors and try again.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MissingFileSpecification

Kind regards

From: Timothy Williams <tlwilliams4 at vcu.edu<mailto:tlwilliams4 at vcu.edu>>
Sent: Wednesday, 22 April 2020 16:54
To: Chris Pretorius <chrisp at lightstoneauto.co.za<mailto:chrisp at lightstoneauto.co.za>>
Cc: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: Re: [Xymon] help with xymonpsclient

Chris,

You are using an outdated script. I could not find the WMI process in any recent versions. I did go back and find it in a 2.19
Version 2.42 now contains:

WriteLog "XymonCollectInfo: CPU info"
    $script:cpuinfo = [ProcessorInformation]::GetSystemInfo()
    $script:numcores  = $cpuinfo.NumberOfProcessors
    WriteLog "Found $($script:numcores) cores"

Latest version properly shows all 24 cores on my Dell R540.

Timothy L. Williams

Operating Systems Analyst

Virginia Commonwealth University Computer Center


On Wed, Apr 22, 2020 at 10:20 AM Chris Pretorius <chrisp at lightstoneauto.co.za<mailto:chrisp at lightstoneauto.co.za>> wrote:
Good day

I have a windows server 2016 that I use winpsclient to collect the server matrix and send to xymon

Problem is the server has 24 cpu’s allocated and on xymon it reports only 12 cores if you open the cpu page for the monitored host

Looks like this is the part in the xymonclient.ps1 script that collects the cpu count:

    WriteLog "XymonCollectInfo: CPU info (WMI)"
    $script:cpuinfo = @(Get-WmiObject -Class Win32_Processor)
    #$script:totalload = 0
    $script:numcpus  = $cpuinfo.Count
    $script:numcores = 0
    $script:numvcpus = 0
    foreach ($cpu in $cpuinfo) {
        #$script:totalload += $cpu.LoadPercentage
        $script:numcores += $cpu.NumberOfCores
        $script:numvcpus += $cpu.NumberOfLogicalProcessors
    }
    #$script:totalload /= $numcpus

    WriteLog "Found $($script:numcpus) CPUs, total of $($script:numcores) cores"

How do I modify the script to count the correct number of processors?

Kind regards

[cid:image001.png at 01D61977.3B4BBBF0]

Chris Pretorius
Senior Linux Administrator

[Lightstone]
chrisp at lightstone.co.za<mailto:chrisp at lightstone.co.za>
www.lightstone.co.za<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.lightstone.co.za_&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=ugSuveOyL_drqnUAz0dZBUcSLSR90WCDryI9hbB4fEc&e=>
0108228687
Centurion Square, 3rd Floor, cnr Heuwel and Gordon Hood rd, Centurion
[cid:image003.png at 01D61977.3B4BBBF0]<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_company_lightstone-2Dpty-2Dltd_&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=YubTgs_Xi2wMuxxq1c_INNOoxExugs09GnFz-nb3sbM&e=>  [cid:image004.png at 01D61977.3B4BBBF0] <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_lightstonetweet&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=2cn6gPi7X1JqOoYf8IeWLQnRn0JAVyyagskFNDpjV4s&e=>   [cid:image005.png at 01D61977.3B4BBBF0] <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.facebook.com_lightstone.sa&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=cm4mmU4mrGdXjx8bgVucTo8u5QZGppNX7FEnQxjsI8c&e=>
This communication is subject to Lightstone's email disclaimer<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.lightstone.co.za_portal_content_email-2Ddisclaimer.aspx&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=-MiIxoykoD8r3ddiP1t9YmO5rOyXH65umVGSjxfQFBo&e=>


_______________________________________________
Xymon mailing list
Xymon at xymon.com<mailto:Xymon at xymon.com>
http://lists.xymon.com/mailman/listinfo/xymon<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.xymon.com_mailman_listinfo_xymon&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=xSaUNdht4ayW-5Ku4Gpsyibh9bTwVmO4Fcm-ju-e40A&s=EnMRF32_s3dEFk_WLA0vdGIbC02vveAowPD59SXbbds&e=>

________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.
______________________________________________________________________________________

www.accenture.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 61389 bytes
Desc: image001.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 8537 bytes
Desc: image002.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 3035 bytes
Desc: image003.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 3141 bytes
Desc: image004.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 2975 bytes
Desc: image005.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200423/88814f16/attachment-0009.png>


More information about the Xymon mailing list