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> 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
*Chris Pretorius *Senior Linux Administrator
[image: Lightstone]
user-3fef1df92e88@xymon.invalid
www.lightstone.co.za
0108228687
Centurion Square, 3rd Floor, cnr Heuwel and Gordon Hood rd, Centurion
<https://www.linkedin.com/company/lightstone-pty-ltd/>
<https://twitter.com/lightstonetweet>
<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)
attachment-0005.png