代理处理器使用率

Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeMonitor (UnitMonitor)

监视所有代理进程,以找出使用太长处理器时间的代理的潜在问题。

Knowledge Base article:

摘要

此监视器计算 Operations Manager 代理及其相关进程的总 CPU 使用率,在 CPU 使用率超出指定数目的连续样本的指定阈值时,此监视器将生成警报。

此监视器的基本脚本的工作方式如下:确定 Operations Manager 代理进程 (HealthService.exe)、其子监视主机进程 (MonitoringHost.exe) 以及这些监视主机进程的子进程(cscript.exe、PowerShell.exe 等)的 CPU 使用率,并对其进行采样。 此脚本运行三次计算,并输出三个连续样本的平均值,然后此监视器使用该平均值确定严重状态或正常状态。

配置

可以使用替代自定义以下参数以改变此监视器的默认行为:

默认情况下,此监视器对于所有管理服务器处于禁用状态。

原因

各种 Operations Manager 代理进程的 CPU 使用率过高可能表示代理或其基本依赖关系之一未正常运行。 如果正确更新了代理及其基本依赖关系,则代理在被监视的系统上被过度使用。 这可能是短暂性的,因为最近更新了管理组,如部署了新管理包,或者这可能是由于代理真的负载过重,在这种情况下,可能需要进行调整。

解决方法

要确保代理及其基本依赖关系正常运行,请检查以下各项:

如果验证这些配置之后此情况依然存在,则需要进行更深入的调查,以了解 CPU 使用率的决定因素。 使用以下步骤的任意组合进行进一步的调查:

当发现一种或多种原因时,可以执行以下任一步骤来解决问题:

如果上述所有步骤不能解决问题,请联系 Microsoft 客户服务和支持部门 (http://support.microsoft.com/)。

其他

此监视器具有相关的诊断任务“收集代理处理器使用率诊断”,此任务将重新运行 CPU 使用率采样。 该诊断任务默认情况下处于禁用状态。

操作控制台中还有一项“获取代理处理器使用率”任务,此任务将重新运行 CPU 使用率采样。 运行“获取代理处理器使用率”任务时,可以设置超时和样本数参数。 此任务将返回一个结果表。 运行“获取代理处理器使用率”任务

Element properties:

TargetMicrosoft.SystemCenter.HealthService
Parent MonitorMicrosoft.SystemCenter.HealthService.PerformanceHealthRollup
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterMonitorType
RemotableFalse
AccessibilityPublic
Alert Message
Operations Manager 代理进程使用的处理器时间太长
所有代理进程在计算机 {0} 上的总处理器使用率超出了多个样本的阈值 {1}。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeMonitor" Accessibility="Public" Enabled="onEssentialMonitoring" Target="SCLibrary!Microsoft.SystemCenter.HealthService" ParentMonitorID="Microsoft.SystemCenter.HealthService.PerformanceHealthRollup" Remotable="false" Priority="Normal" TypeID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterMonitorType" ConfirmDelivery="true">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter1>
<AlertParameter2>$Data/Context/SampleValue$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CPUTimeOverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Error"/>
<OperationalState ID="CPUTimeUnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>321</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<SyncTime>00:00</SyncTime>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<Threshold>25</Threshold>
<ConsecutiveSampleCountCritical>6</ConsecutiveSampleCountCritical>
<ConsecutiveSampleCountHealthy>3</ConsecutiveSampleCountHealthy>
</Configuration>
</UnitMonitor>