处理器时间百分比(Windows Server 2016 及更高版本)

Microsoft.Windows.Server.10.0.Processor.PercentProcessorTime.Collection (Rule)

收集 Processor\\% Processor Time 性能计数器

Knowledge Base article:

摘要

此规则收集 Processor\% Processor Time 性能计数器的性能数据。

Processor\% Processor Time 性能计数器显示处理器执行非闲置线程的已用时间百分比。它是通过测量采样间隔期间活动的闲置线程的持续时间减去内部持续时间计算而来的。 (没有其他线程准备运行时,每个处理器都有占用时钟周期的空闲线程)。此计数器是处理器活动的主要指示器,显示在采样间隔期间观察到的忙时间的平均百分比。通过监视服务处于非活动状态的时间,然后从 100% 中减去该值,即可计算出它。

Element properties:

TargetMicrosoft.Windows.Server.10.0.Processor
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
PerformanceDS DataSource Microsoft.Windows.Server.10.0.Processor.Performance.ModuleType Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.Windows.Server.10.0.Processor.PercentProcessorTime.Collection" Enabled="true" Target="ServervNext!Microsoft.Windows.Server.10.0.Processor">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="PerformanceDS" TypeID="Microsoft.Windows.Server.10.0.Processor.Performance.ModuleType">
<CounterName>% Processor Time</CounterName>
<ObjectName>Processor</ObjectName>
<InstanceName>$Target/Property[Type="WindowsServer!Microsoft.Windows.Server.Processor"]/PerfmonInstance$</InstanceName>
<Frequency>300</Frequency>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>