MSSQL 2016: 数据库引擎线程计数

Microsoft.SQLServer.2016.DBEngine.ThreadCount.Collection (Rule)

SQL 2016 数据库引擎线程计数性能收集规则

Knowledge Base article:

摘要

MSSQL 2016: 数据库引擎线程计数

在此进程中当前处于活动状态的线程的数目。指令是处理器中执行操作的基本单位,线程是执行指令的对象。每个运行中的进程都具有至少一个线程。

可替代参数

名称

说明

默认值

缓存到期时间

指定工作流可使用的缓存中信息的最长存在时间。可以省略。

43200

已启用

启用或禁用工作流。

间隔(秒)

运行工作流的重复间隔时间(秒)。

900

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

00:18

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2016.DBEngine.ThreadCount.DataSourceMapped Microsoft.SQLServer.MonitoringAccount
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2016.DBEngine.ThreadCount.Collection" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.DBEngine" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2016.DBEngine.ThreadCount.DataSourceMapped" RunAs="GPMP!Microsoft.SQLServer.MonitoringAccount">
<ServiceName>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ServiceName$</ServiceName>
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</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>