March 10, 2020 at 1:30 pm
Hi there,
i am using this script to get the cpu utilization. Unfortanetly I get wrong results. The NonSQLCPUUtilization is always negative. It's a SQL Server 2014 with CU4. We have an other SQL Server 2014 with CU4 where it works correctly. Any hints are appreciated.
Regards
select top 10
id, SQLServerCPUUtilization, 100 - SystemIdle - SQLServerCPUUtilization as NonSQLCPUUtilization
from (
select
record.value('(./Record/@id)[1]', 'int') as id,
record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') as SystemIdle,
record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]', 'int') as SQLServerCPUUtilization,
timestamp
from (
select timestamp, convert(xml, record) as record
from sys.dm_os_ring_buffers
where ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR'
and record like '%<SystemHealth>%') as RingBufferInfo
) AS TabularInfo
order by id desc
March 10, 2020 at 3:53 pm
Out of interest, but I think it might be related... have you got any power management settings configured on that server?
Thomas Rushton
blog: https://thelonedba.wordpress.com
March 11, 2020 at 5:33 am
Hi Thomas,
just checked this server. It's set to high performance in the BIOS and in Windows.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply