[Xymon] help with xymonpsclient

Chris Pretorius chrisp at lightstoneauto.co.za
Wed Apr 22 13:01:06 CEST 2020


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 01D618A6.14853400]

Chris Pretorius
Senior Linux Administrator

[Lightstone]
chrisp at lightstone.co.za<mailto:chrisp at lightstone.co.za>
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 01D618A6.14853400]<https://www.linkedin.com/company/lightstone-pty-ltd/>  [cid:image004.png at 01D618A6.14853400] <https://twitter.com/lightstonetweet>   [cid:image005.png at 01D618A6.14853400] <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>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20200422/4d25ffcd/attachment.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/20200422/4d25ffcd/attachment.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/20200422/4d25ffcd/attachment-0001.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/20200422/4d25ffcd/attachment-0002.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/20200422/4d25ffcd/attachment-0003.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/20200422/4d25ffcd/attachment-0004.png>


More information about the Xymon mailing list