收集代理程式處理器使用率

Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollection (Rule)

收集 [Agent Processor Utilization] 效能計數器

Knowledge Base article:

摘要

此規則會計算 Operations Manager 代理程式及其相關處理序的 CPU 總使用率,然後再提交該使用率,作為「健全狀況服務」物件和 [Agent Processor Utilization].計數器底下的效能資料。

此規則之基礎指令碼運作的方式是尋找及取樣 Operations Manager 代理程式處理序 (HealthService.exe)、其子監視主機處理序 (MonitoringHost.exe) 和這些監視主機處理序的子處理序 (cscript.exe、PowerShell.exe 等) 的 CPU 使用率。 此指令碼會執行三次計算,並將三個連續範例的平均值寫入操作資料庫和資料倉儲中。

請查看 [代理程式效能] 檢視,以檢閱代理程式 CPU 使用率的取樣資料。

代理程式效能檢視

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterDataSource Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollection" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.HealthService" ConfirmDelivery="true" Remotable="false" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterDataSource">
<IntervalSeconds>321</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<SyncTime>00:00</SyncTime>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SCLibrary!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>