Share via


Utility Control Point reporting incorrect CPU utilization when Server has more than 40 logical processor

Recently I have worked with one of customer wherein Utility Control Point (UCP) reporting incorrect CPU utilization when Server has more than 40 logical processor. So due to this issue customer getting false alert for CPU utilization, when CPU on Server below normal threshold.

During troubleshooting we have found num_processors column of sysutility_mi_cpu_stage_internal table contain incorrect value. So server has 80 Logical processor however we could see only 40 being reported, so due to this all calculation was going wrong.

 

SELECT [num_processors]
,[cpu_name]
,[cpu_caption]
,[cpu_family_id]
,[cpu_architecture_id]
,[server_instance_name]
,[virtual_server_name]
,[physical_server_name]
,[instance_processor_usage_percentage]
,[computer_processor_usage_percentage]
FROM [msdb].[dbo].[sysutility_mi_cpu_stage_internal]

 

We followed below workaround on SQL SERVER 2016 SP1 to resolve this issue:

1. On each enrolled machine go to the sysutility_mi_collect_and_upload SQL Server Agent Job.

2. Edit the Stage Data Collected from PowerShell Script step

3. In the PowerShell script find the line

[Int32] $numProcessors = [System.Environment]::ProcessorCount (line 741 in 2016 SP1 copy of the script)

4. Replace this line with

[Int32] $numProcessors = (@(gwmi Win32_Processor) | measure -property NumberOfLogicalProcessors -sum).Sum

Note:  Please take msdb and entire script backup before you modify this code. If you edit the code incorrectly then this can cause UCP job to fail. I have tested this workaround only with SQL SERVER 2016 SP 1 only.

 

Vikas Rana

Twitter| Linkedin | Support Escalation Engineer
Microsoft India GTSC