Xymon Mailing List Archive search

help with xymonpsclient

list Chris Pretorius
Thu, 23 Apr 2020 05:29:16 +0000
Message-Id: <user-e0d95d7d73c8@xymon.invalid>

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 <user-1a5482fb085e@xymon.invalid>
Sent: Wednesday, 22 April 2020 20:24
To: Chris Pretorius <user-832aac18b2a8@xymon.invalid>
Cc: 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 <user-832aac18b2a8@xymon.invalid<mailto:user-832aac18b2a8@xymon.invalid>> 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 <user-1a5482fb085e@xymon.invalid<mailto:user-1a5482fb085e@xymon.invalid>>
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 <user-1a5482fb085e@xymon.invalid<mailto:user-1a5482fb085e@xymon.invalid>>
Sent: Wednesday, 22 April 2020 16:54
To: Chris Pretorius <user-832aac18b2a8@xymon.invalid<mailto:user-832aac18b2a8@xymon.invalid>>
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 <user-832aac18b2a8@xymon.invalid<mailto:user-832aac18b2a8@xymon.invalid>> 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 01D61940.E46F0250]

Chris Pretorius
Senior Linux Administrator

[Lightstone]
user-3fef1df92e88@xymon.invalid<mailto:user-3fef1df92e88@xymon.invalid>
www.lightstone.co.za<https://www.lightstone.co.za/>;
0108228687
Centurion Square, 3rd Floor, cnr Heuwel and Gordon Hood rd, Centurion
[cid:image003.png at 01D61940.E46F0250]<https://www.linkedin.com/company/lightstone-pty-ltd/>;  [cid:image004.png at 01D61940.E46F0250] <https://twitter.com/lightstonetweet>;   [cid:image005.png at 01D61940.E46F0250] <https://www.facebook.com/lightstone.sa>;
This communication is subject to Lightstone's email disclaimer<http://www.lightstone.co.za/portal/content/email-disclaimer.aspx>;
Attachments (1)