mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
233 stars 91 forks source link

check_cpu return abnormal (negative billions) percentage #780

Open christophe-activiumid opened 1 year ago

christophe-activiumid commented 1 year ago

Issue and Steps to Reproduce

run "check_cpu" with "nscp.exe test" shell on a physical computer with 64+ logical processors(threads) and windows 2022 (running hyper-v) image

Expected Behavior

I should get something like this, with perfdata value between 0 and 100% image

Actual Behavior

I get this with extremly high negative number (around -32G%) image

Details

Additional Details

it only happens with physical server with more than 64 thread running hyper-v on 2022,

unfortunately I don't that many server to test if it's physical server, or more than XX threads, or non-hyper-v, this are the first servers with this kind of combo hard/os we had to provision

I do have some old windows 2016 with more than 32 threads and hyper-v that never add this issue, no way to test more broadly I can just confirm a 2x20core/80threads and a 2x18/72 server (HPe, DL380Gen10 intel xeon)

dragonuaix commented 1 year ago

Also have exact issue after upgrading to windows server 2022 on a physical server with 96 cores.

check_cpu shows right CPU load when the actual cpu load is below ~40% and negative billons percentage when cpu load is higher.

Details NSClient++ version: 0.5.2.41 OS and Version: Windows Server 2022 Checking from: locally Checking with: 'nrpe test'

tjcolby13 commented 1 year ago

I have the same issue on Windows 2022. It worked fine on Windows 2019.

dragonuaix commented 1 year ago

Deprecated API functions https://learn.microsoft.com/en-us/windows/win32/procthread/numa-support

Workaround - to restrict nscp to only one processor node group by setting cpu affinity (for example, in task manager - rightclick on process, select "set affinity", set to allow to run on only one processor group). However, it will monitor only this cpu node group.

sharbui commented 1 year ago

Also have exact issue but only occure on google cloud compute engine with windows 2016 std

NSClient++ version: 0.5.2.35 OS and Version: Windows Server 2016 on google cloud