CPU 使用量 (\%)

Microsoft.SQLServer.2012.DBEngine.CPUUsagePercentMonitor (UnitMonitor)

2012 資料庫引擎的 CPU 使用量 (\%)

Knowledge Base article:

摘要

提供測量到處理器實際在 SQL Server 處理序執行緒上運作所花費的時間。

原因

所有配置的 CPU 都忙於處理 SQL Server 工作。

解決方式

使用效能監視器 SQL Server 計數器以及與效能相關的 DMV (例如 sys.dm_exec_query_stats) 來評估 SQL Server 使用很高的 CPU 百分比原因。

疑難排解 SQL Server 2012 的效能問題

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

建立擴充事件工作階段

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

可覆寫的參數

名稱

描述

預設值

警示優先程式

定義警示優先順序。

一般

警示嚴重性

定義警示嚴重性。

錯誤

快取到期時間

指定工作流程所能使用之快取資訊的留存時間上限。可以省略。

43200

已啟用

啟用或停用該工作流程。

產生警示

定義工作流程是否會產生警示。

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

300

範例數

如果超過計數的參數臨界值,大於或等於範例數目,則監視器會處於錯誤的狀態

6

同步處理時間

使用 24 小時制指定的同步處理時間。將會忽略。

00:06

臨界值

臨界值

95

逾時 (秒)

指定工作流程在關閉並標記為失敗前所能執行的時間。

200

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.DBEngine.CPUUsagePercent.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
SQL 資料庫引擎 2012 CPU 使用量 (\%) 太高
電腦 "{1}" 上 SQL 執行個體 "{0}" 的 CPU 使用量太高。請參閱 [警示內容] 索引標籤,以取得詳細資料。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercentMonitor" Accessibility="Public" Enabled="true" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.MonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercentMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Normal" MonitorTypeStateID="Normal" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<Threshold>95</Threshold>
<NumSamples>6</NumSamples>
<SyncTime/>
<CacheExpirationTime>43200</CacheExpirationTime>
</Configuration>
</UnitMonitor>