CPU 사용률(\%)

Microsoft.SQLServer.Windows.Monitor.DBEngine.CPUUtilization (UnitMonitor)

MSSQL DB 엔진에 대한 CPU 사용률(\%)입니다.

Knowledge Base article:

요약

모니터는 프로세서가 SQL Server의 프로세스 스레드에서 실제로 작동하는 데 소요된 시간을 측정합니다. 모니터의 실행 간격은 60초보다 작아서는 안 되며 60으로 나눌 수 있어야 합니다. 그렇지 않으면 반환되는 데이터가 부정확해집니다.

원인

모든 할당된 CPU는 SQL Server 태스크를 처리하는 데 사용됩니다.

해결 방법

성능 모니터 SQL Server 카운터 및 DMV 관련 성능(예: sys.dm_exec_query_stats)을 사용해서 SQL Server의 CPU 사용 비율이 높은 이유를 평가합니다.

SQL Server의 성능 문제 해결

http://go.microsoft.com/fwlink/?LinkId=789165

확장된 이벤트 세션 만들기

https://msdn.microsoft.com/ko-kr/library/hh213147.aspx

재정의 가능한 매개 변수

이름

설명

기본값

경고 우선 순위

알림 우선 순위를 정의합니다.

보통

경고 심각도

알림 심각도를 정의합니다.

오류

사용

워크플로 사용하거나 사용하지 않도록 설정합니다.

알림 생성

워크플로에서 알림을 생성하는지 여부를 정의합니다.

간격(초)

워크플로를 실행하는 반복 시간 간격(초)입니다.

300

샘플 수

상태가 변경되기 전 측정된 값이 임계값을 위반한 횟수를 나타냅니다.

6

동기화 시간

24시간 형식으로 지정된 동기화 시간입니다. 생략될 수 있습니다.

 

임계값

수집된 값이 이 매개 변수와 비교됩니다.

90

시간 제한(초)

여기서 지정한 시간 동안 워크플로가 실행된 후 워크플로가 닫히고 실패로 표시됩니다.

200

데이터베이스 연결 시간 제한(초)

워크플로는 지정된 기간 동안 데이터베이스에 액세스할 수 없으면 실패하며 이벤트를 등록합니다.

15

Element properties:

TargetMicrosoft.SQLServer.Windows.DBEngine
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Windows.MonitorType.DBEngine.CPUUtilization
RemotableTrue
AccessibilityPublic
Alert Message
Windows의 MSSQL: CPU 사용률(\%)이 너무 높습니다.
"{1}" 컴퓨터에서 SQL 인스턴스 "{0}"의 CPU 사용률이 너무 높습니다. 자세한 내용은 "경고 컨텍스트" 탭을 참조하세요.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Windows.Monitor.DBEngine.CPUUtilization" Accessibility="Public" Enabled="true" Target="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Windows.MonitorType.DBEngine.CPUUtilization" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Windows.Monitor.DBEngine.CPUUtilization.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Normal" MonitorTypeStateID="Normal" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<MonitoringType>$Target/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<Threshold>90</Threshold>
<NumSamples>6</NumSamples>
<SqlExecTimeoutSeconds>60</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>