Sleduje využití procesoru na nadřazeném oddíle.
Tento monitor sleduje výkon procesoru hostitele. Hodnota využití procesoru překročila prahovou hodnotu.
Virtuální počítače a zátěže nadřazených oddílů spuštěné v hostitelském počítači spotřebovávají kritickou úroveň prostředků procesoru hostitele.
Proveďte migraci virtuálních počítačů do jiného hostitelského počítače nebo snižte spotřebu procesoru zátěže nadřazeného oddílu. Rovněž lze povolením dynamické optimalizace nechat nástroj Virtual Machine Manager, aby automaticky rozkládal zátěž clusterů hostitele. Další informace o dynamické optimalizaci získáte v dokumentaci k nástroji Virtual Machine Manager.
Target | Microsoft.SystemCenter.VirtualMachineManager.Discovery.HyperVHost | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | Custom | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SystemCenter.VirtualMachineManager.Performance.PowershellBasedConsecutiveSamplesTwoThresholdsMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.HostParentPartitionCPUUtilizationMonitor" Accessibility="Public" Target="VMMDiscovery!Microsoft.SystemCenter.VirtualMachineManager.Discovery.HyperVHost" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" TypeID="Microsoft.SystemCenter.VirtualMachineManager.Performance.PowershellBasedConsecutiveSamplesTwoThresholdsMonitorType">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.HostParentPartitionCPUUtilizationMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Data/Context/SampleValue$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="CPUUtilizationReachedWarning" MonitorTypeStateID="ConditionWarn" HealthState="Warning"/>
<OperationalState ID="CPUUtilizationReachedError" MonitorTypeStateID="ConditionError" HealthState="Error"/>
<OperationalState ID="CPUUtilizationIsSuccess" MonitorTypeStateID="ConditionSuccess" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>180</IntervalSeconds>
<TimeoutSeconds>180</TimeoutSeconds>
<WarningThreshold>80</WarningThreshold>
<CriticalThreshold>90</CriticalThreshold>
<NumSamples>3</NumSamples>
<hostComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</hostComputerName>
<ScriptBody> # This Script is used to check the Host Parent partition CPU utilization
# Alert when the utilization of this partition is high:
# Warning: WarningThreshold%, like 80%
# Critical: CriticalThreshold, like 90%
#SetLocale("en-us")
param($HostComputerName)
$momApi = new-Object -comObject "Mom.ScriptAPI"
$momBag = $momApi.CreatePropertyBag()
if ($HostComputerName -ne $null)
{
Load-CimModules
$hostName=$HostComputerName
$cimSessionOption = New-CimSessionOption -Protocol DCOM
$cimsession = New-CimSession -ComputerName $hostName -SessionOption $cimSessionOption
$itemsPerfFormattedData_Perfos_Processor = Get-CimInstance -CimSession $cimsession -ClassName "win32_PerfFormattedData_Perfos_Processor" -Namespace "root\cimv2" -Filter "Name='_Total'"
ForEach ($item in $itemsPerfFormattedData_Perfos_Processor)
{
$performanceUtilization= $item.PercentProcessorTime
}
$performanceUtilization = [int]($performanceUtilization)
$momBag.AddValue("Utilization", $performanceUtilization)
$momBag
}
else
{
$momAPI.LogScriptEvent("HostParentCPUUtilizationCounter.ps1", 101, 0, "HostParentCPUUtilizationCounter was not called with 1 argument and was not executed.")
}
Function Load-CimModules
{
$error.Clear()
$CimModule = Get-Module CimCmdlets
if ($null -eq $CimModule)
{
Import-Module CimCmdlets
$error.Clear()
}
}
</ScriptBody>
<ObjectName>win32_PerfFormattedData_Perfos_Processor</ObjectName>
<CounterName>PercentProcessorTime</CounterName>
<InstanceName>_Total</InstanceName>
<Value>$Data/Property[@Name='Utilization']$</Value>
</Configuration>
</UnitMonitor>