MSSQL 2012: Collect DB Engine CPU Utilization (\%)

Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.Collection (Rule)

SQL 2012 DB Engine CPU Utilization (\%) performance collection rule.

Knowledge Base article:

Summary

MSSQL 2012: DB Engine CPU Utilization (%)

System CPU usage by instance of sqlservr.exe process.

Percentage of CPU utilization depends on the processors affinity mask set for the SQL Server instance. If the affinity mask is set automatically for all processors, the accumulated value will be counted with consideration for the amount of all processors’ cores according to the SQL Server edition.

Overrideable Parameters

Name

Description

Default Value

Cache Expiration Time

Specifies the maximum age of information from cache the workflow can use. May be omitted.

43200

Enabled

Enables or disables the workflow.

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

300

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

00:06

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

200

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSourceMapped Microsoft.SQLServer.SQLProbeAccount
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.Collection" Enabled="true" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSourceMapped" RunAs="SQL!Microsoft.SQLServer.SQLProbeAccount">
<ServiceName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</ServiceName>
<IntervalSeconds>300</IntervalSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SyncTime/>
<CacheExpirationTime>43200</CacheExpirationTime>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>