Page 1 of 1
CPU usage WMI vs NCPA 1.8.1 windows multi cores
Posted: Fri Nov 06, 2015 9:57 am
by mon-team
I have windows server 2008 R2 with 24 cpus
I check the values on the CPU is NOT equal between WMI and NCPA 1.8.1
NCPA:
OK: Percent was 25.00% (0%, 0%, 0%, 0%, 0%, 0%, 0%, 100%, 0%, 100%, 0%, 100%, 100%, 0%, 100 %, 0%, 100%, 0%, 0%, 0%, 0%, 0%, 0%, 0%)
WMI:
OK (SAMPLE PERIOD 299 sec) - Average CPU Utilisation 3.92%
On windows server 2008 R2 reflected a value much the same as that given by WMI.
Please see image.
Is there some setting or a fix?
Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores
Posted: Fri Nov 06, 2015 11:31 am
by lmiltchev
I check the values on the CPU is NOT equal between WMI and NCPA 1.8.1
Are you running your cpu check at the same time you are watching the Resource Monitor on the Windows server?
The CPU usage will constantly fluctuate - it is almost impossible to get the same readings as you can't run the check at the exact same time...
Perhaps, it's better if you started monitoring the cpu usage over time (i.e. via the windows performance counters), and compared the graphs (with the NCPA CPU check) over the same time period.
Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores
Posted: Mon Nov 09, 2015 7:06 am
by mon-team
I followed the check from the command line on two shells simultaneously:
NCPA:
OK: Percent was 45.83% (100%,0%,0%,0%,100%,100%,100%,0%,100%,100%,0%,100%,100%,0%,0%,0%,100%,0%,0%,100%,0%,0%,100%,0% )|'used_percent'=45.83%;80;90
WMI:
OK (Sample Period 2405 sec) - Average CPU Utilisation 8.46%|'Avg CPU Utilisation'=8.46%;80;90;
The result is very different between wmi and resources of windows. Any ideas?
I attached the performance graph of two check
Re: CPU usage WMI vs NCPA 1.8.1 windows multi cores
Posted: Mon Nov 09, 2015 10:56 am
by lmiltchev
Can you show us the actual "NCPA CPU usage" command run from the command line, along with the output of it? Also, run:
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -V
and show the output.
Note: I tested this check against Windows 7 and it worked fine but I haven't tried it on Windows server 2008 R2. It is possible that there is a bug but I am not able to confirm it at this time.
example01.PNG
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -V
check_ncpa.py, Version 0.3.5
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.x.x -t 'mytoken' -P 5693 -M cpu/percent -q aggregate=avg -w 80 -c 90
OK: percent was 15% | 'percent_0'=15%;80;90;