監視主機控制碼計數閾值

Microsoft.SystemCenter.Agent.MonitoringHost.HandleCountThreshold (UnitMonitor)

此監視可確保 "MonitoringHost.exe" 處理序的 "Process\Handle Count" 計數器在經過一系列的連續取樣後,不會超過所設定的閾值。 如果符合條件,此監視將會變更為重大狀態,接著該狀態將彙總至「健全狀況服務狀態」監視。 "Health Service State" 監視已設定成要在其狀態為重大時執行復原作業,以自動嘗試重新啟動 System Center 管理健全狀況服務。

Knowledge Base article:

摘要

此規則會測量監視主機處理序所有執行個體的 [Process\Handle Count] 使用率。 如果它超過設定的閾值,回應會嘗試重新啟動 System Center 管理健全狀況服務,確保電腦處理量不再超過負荷。

依據設定 System Center 管理健全狀況服務執行的角色,會有多種不同閾值。 以下是預設閾值摘要:

System Center 管理健全狀況服務角色

控制碼計數閾值

代理程式

6,000

管理伺服器

10,000

以下是會嘗試重新啟動 System Center 管理健全狀況服務的回應之設定:

System Center 管理健全狀況服務角色

重新啟動回應行為

代理程式

已啟用

管理伺服器

無重新啟動回應

原因

可能原因的簡短摘要如下:

從設定此 System Center 管理健全狀況服務的所有管理組件載入太多規則與監視。

設定錯誤的規則或監視收集太多資料或處理太多資料 (例如效能計數器集合規則會每 1 秒收集一次資料)

這可能是由執行多個管理組件的 System Center 管理健全狀況服務所造成。 每個管理組件可能有許多使用少量資源的監視。 由於每個監視主機執行個體具有總計達數千個規則與監視的多個管理組件,可能會消耗更多資源。

視 System Center 管理健全狀況服務所執行的監視類型而定,這是此 System Center 管理健全狀況服務可能會發生的狀況。

另一個原因可能是有一個或多個規則與監視不符合某些最佳作法。 例如嘗試每 1 秒收集一次效能資料的效能計數器規則。 如果如此設定的規則與監視太多,會導致 monitoring host.exe 處理序消耗更多資源。

解決方式

代理程式上執行的此規則之預設動作為重新啟動 System Center 管理健全狀況服務。 因為此復原在代理程式上預設為啟用,使用者不須採取任何動作。

請注意,如果設定此代理程式的動作帳戶沒有正確權限重新啟動服務,System Center 管理健全狀況服務可能無法正確重新啟動。

如果發生此情況,請啟動 System Center 管理健全狀況服務 Windows 服務。

如果您認為此代理程式執行之監視數量所使用的資源很適當,可以覆寫閾值或停用規則。

Element properties:

TargetMicrosoft.SystemCenter.Agent
Parent MonitorMicrosoft.SystemCenter.HealthService.ServiceStateRollup
CategoryPerformanceHealth
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.Agent.Performance.ConsecutiveSamplesThreshold.MonitorType
RemotableFalse
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.Agent.MonitoringHost.HandleCountThreshold" Accessibility="Public" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.Agent" ParentMonitorID="Microsoft.SystemCenter.HealthService.ServiceStateRollup" Remotable="false" Priority="High" TypeID="Microsoft.SystemCenter.Agent.Performance.ConsecutiveSamplesThreshold.MonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<OperationalStates>
<OperationalState ID="HandleCountUnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Success"/>
<OperationalState ID="HandleCountOverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<ObjectName>Process</ObjectName>
<CounterName>Handle Count</CounterName>
<InstanceName>MonitoringHost*</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>120</Frequency>
<NumSamples>5</NumSamples>
<Threshold>6000</Threshold>
<Direction>greater</Direction>
</Configuration>
</UnitMonitor>