Sql server CPU utilization shows 100%

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Sql server CPU utilization shows 100%

Post by kalyan1709 »

Hi,

I am monitoring my sql parameters using check_nt plugin in Nagios.

I am using below command to monitor Sql server CPU utilization for one of my SQL server:
./check_nt -H <IP> -p 12489 -v COUNTER -l "\\Process(sqlservr)\\% Processor Time","CPU Time for sqlservr is %.f.0 %%","Processor Time" -w 80 -c 100

Output: CPU Time for sqlservr is 100.0 % | 'CPU Time for sqlservr is %.f.0 %%'=100.000000%;80.000000;100.000000;

I wonder the CPU utilization is giving 100% . But actually it is not taking that much utilization.

Any help/suggestions please.

Thanks & Regards
Kalyan
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Sql server CPU utilization shows 100%

Post by abrist »

Well, that is what the perf counter is reporting. Have you checked the perf counter on the windows system for this process? What does it report for cpu time utilization?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
mickem
Posts: 16
Joined: Tue Oct 08, 2013 2:17 am
Location: Stockholm, SWEDEN
Contact:

Re: Sql server CPU utilization shows 100%

Post by mickem »

Now I am just guessing here but...

Could it be that the counter in question is affected by cores?
In which case the caps is not 100%?
For such counters you need to switch to check_nrpe and use the nocap100 flag to get values above 100%.

This is a "feature" of the performance data counterd that many % counters are not in fact 0-100 instead 0 -100x<multiplier> which kind of sucks since the returned value is by default capped to 100 (unless you set the nocap100 flag).

// Michael Medin
// Michael Medin @mickem, blog.medin.name

Author of NSClient++ - http://nsclient.org
NSClient++ 0.4.2 Documentation: http://docs.nsclient.org
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Sql server CPU utilization shows 100%

Post by abrist »

mickem wrote:For such counters you need to switch to check_nrpe and use the nocap100 flag to get values above 100%.
I was not aware of this flag. The more you know . . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked