监视所有代理进程,以找出使用太长处理器时间的代理的潜在问题。
此监视器计算 Operations Manager 代理及其相关进程的总 CPU 使用率,在 CPU 使用率超出指定数目的连续样本的指定阈值时,此监视器将生成警报。
监视器的基本脚本的工作方式如下: 确定 Operations Manager 代理进程(HealthService.exe)、其子监视主机进程(MonitoringHost.exe)以及这些监视主机进程的子进程(cscript.exe、PowerShell.exe 等)的 CPU 使用率,并对其进行采样。此脚本运行三次计算,并输出三个连续样本的平均值,然后此监视器使用该平均值确定严重状态或正常状态。
可以使用替代自定义以下参数以改变此监视器的默认行为:
频率(秒)。这是监视器对代理处理器使用率进行采样的频率。默认情况下,监视器每 300 秒(5 分钟)评估一次代理处理器使用率。
严重状态的连续样本数。默认情况下,当 6 个连续样本超过指定阈值时,此监视器会报告严重状态。
正常状态的连续样本数。默认情况下,当 3 个连续样本低于指定阈值时,此监视器会返回正常状态。
阈值。默认情况下,CPU 使用率的阈值为 25%。
默认情况下,此监视器对于所有管理服务器处于禁用状态。
各种 Operations Manager 代理进程的 CPU 使用率过高可能表示代理或其基本依赖关系之一未正常运行。如果正确更新了代理及其基本依赖关系,则代理在被监视的系统上被过度使用。这可能是短暂性的,因为最近更新了管理组,如部署了新管理包,或者这可能是由于代理真的负载过重,在这种情况下,可能需要进行调整。
要确保代理及其基本依赖关系正常运行,请检查以下各项:
验证系统上是否安装了最新版本的 Operations Manager 代理。
验证是否安装了 知识库文章 968967 (http://go.microsoft.com/fwlink/?LinkId=181885) 中提供的 MSXML 6.0 更新。
如果系统的操作系统是 Windows XP、Windows 2000 Server 或 Windows Server 2003,请确保系统运行的是 Windows Script Host 5.7 或更高版本。以下链接提供了 Windows Script Host 5.7 的下载位置 http://go.microsoft.com/fwlink/?LinkId=181884。
如果验证这些配置之后此情况依然存在,则需要进行更深入的调查,以了解 CPU 使用率的决定因素。使用以下步骤的任意组合进行进一步的调查:
使用以下视图查看代理处理器使用率、工作流计数和模块计数的最新历史记录:代理性能视图。代理处理器使用率数据会使你深入了解问题是最近发生的还是已经发生了较长一段时间。工作流和模块计数数据将指明各种规则、监视器和发现对代理施加的工作负荷。此数据还应该与运行状况代理进行比较以用作对比。
使用 Effective Configuration Viewer(有效的配置查看器)(http://go.microsoft.com/fwlink/?LinkId=182300) 之类的工具了解在代理上发现的类实例的数目。类实例越多,工作流和模块计数就越大,进而使工作负荷越重。
使用性能监视器从进程对象中收集更详细的处理器时间百分比度量数据。这样可以了解总处理器使用率最主要由哪些进程的处理器使用率构成。
查看任意最新的管理包更新或更改,看它们是否与 CPU 使用率的增加有对应关系。
当发现一种或多种原因时,可以执行以下任一步骤来解决问题:
如果最近更改了管理包或者部署了新管理包,请监视情况,看问题是否依然存在。
通过替代来减小发现的频率,以在一天中分摊其 CPU 使用率。这么做的代价是可能会经历较长时间才会执行发现。
减小按计划运行规则或监视器的频率,以在一天中分摊其 CPU 使用率。这么做以牺牲监视为代价。
如果代理由多个管理组(称为“多宿主”的配置)管理,则这也将造成处理器使用率较高。请考虑减少管理代理的管理组的数目。
如果上述所有步骤不能解决问题,请联系 Microsoft 客户服务和支持部门 (http://support.microsoft.com/)。
此监视器具有相关的诊断任务“收集代理处理器使用率诊断”,此任务将重新运行 CPU 使用率采样。该诊断任务默认情况下处于禁用状态。
操作控制台中还有一项“获取代理处理器使用率”任务,此任务将重新运行 CPU 使用率采样。运行“获取代理处理器使用率”任务时,可以设置超时和样本数参数。此任务将返回一个结果表。运行“获取代理处理器使用率”任务
Target | Microsoft.SystemCenter.HealthService | ||
Parent Monitor | Microsoft.SystemCenter.HealthService.PerformanceHealthRollup | ||
Category | Custom | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterMonitorType | ||
Remotable | False | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<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/>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<Threshold>25</Threshold>
<ConsecutiveSampleCountCritical>6</ConsecutiveSampleCountCritical>
<ConsecutiveSampleCountHealthy>3</ConsecutiveSampleCountHealthy>
</Configuration>
</UnitMonitor>