WMI 記憶體使用量監視

Microsoft.SystemCenter.WMIPrivateBytes.Monitor (UnitMonitor)

此監視會檢查電腦上的 WMI 記憶體使用量。

Knowledge Base article:

摘要

此電腦上的 WMI 服務使用過多記憶體。

此監視會定期檢查 WMI 在電腦上使用的總記憶體,方法是檢查所有以 WmiPrv 為起始的執行程序執行個體之「私用位元組」計數器,並比較這兩個閾值。 根據預設,如果有任何 WMI 相關的處理程序消耗超過 500 MB 的記憶體,此監視會進入警告狀態。 如果有任何 WMI 相關的處理程序消耗超過 600 MB 的記憶體,則此監視會進入錯誤狀態。

原因

可能的原因是 WMI 記憶體洩漏,導致 WMI 隨著時間消耗越來越多的記憶體。

解決方式

如果您看到 WMI 記憶體問題的模式,此監視某個已停用的復原將會自動在超過警告或錯誤閾值重新啟動 WMI。 如果您發現此方法解決了問題,則可以啟用其中一個復原。

外部

如需疑難排解 WMI 問題的詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkId=158224

您可以從 http://go.microsoft.com/fwlink/?LinkId=158226 下載 WMI Diagnosis Utility。 WMI Diagnosis Utility 是為了協助您疑難排解電腦上 WMI 服務而設計的 VBScript 指令碼。

Element properties:

TargetMicrosoft.SystemCenter.Agent
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.Performance.FilteredDoubleThreshold.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
WMI 記憶體使用量過高

WMI 記憶體使用量過高,執行個體 {0} 物件 {1} 計數器 {2} 在電腦 {4} 中的值為 {3}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.WMIPrivateBytes.Monitor" Accessibility="Public" Enabled="false" Target="SCLibrary!Microsoft.SystemCenter.Agent" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.Performance.FilteredDoubleThreshold.MonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.WMIPrivateBytes.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/InstanceName$</AlertParameter1>
<AlertParameter2>$Data/Context/ObjectName$</AlertParameter2>
<AlertParameter3>$Data/Context/CounterName$</AlertParameter3>
<AlertParameter4>$Data/Context/Value$</AlertParameter4>
<AlertParameter5>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Success"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Private Bytes</CounterName>
<ObjectName>Process</ObjectName>
<InstanceName/>
<AllInstances>true</AllInstances>
<Frequency>300</Frequency>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">InstanceName</XPathQuery>
</ValueExpression>
<Operator>ContainsSubstring</Operator>
<Pattern>WmiPrv</Pattern>
</RegExExpression>
</Expression>
<Threshold1>524288000</Threshold1>
<Threshold2>629145600</Threshold2>
</Configuration>
</UnitMonitor>