Introduction

Hyper-V monitoring template. Monitors available bytes, average pressure, hyper-visor partition deposited pages, etc.

Discovery with the agent

Collector Type: Agent

Category: Application Monitors

Application Name: Microsoft Hyper-V Server Template

Pre-requisites

For Hyper-V monitors need Microsoft .NET Framework 3.5

Need Hyper-V specific WMI classes. Please follow below steps to validate the presence of classes in the target devices.

  1. Run -> WBEMTest -> Run the below mentioned WMI Queries

  2. If the query is not exists in WBEMTEST check it in Perfmon (Run -> Type Perfmon) in the perfmon if the object is exists we have the command to load the objects from perfmon to WBEMTEST follow the below step.

  3. Go to this path C:\Windows\System32\wbem -> lodctr.exe /r . After doing this command the classes are loaded from perfmon to WBEMTEST forcefully.

  4. To refresh the wbemtest after loading the classes from perfmon to WBEMTEST use this: C:\Windows\System32\wbem -> WMIADAP.EXE /r

Collected Metrics

Metric NameDisplay NameDescription
Memory_AvailableBytesSELECT AvailableBytes FROM Win32_PerfFormattedData_PerfOS_MemoryShows the amount of physical memory, in bytes, immediately available for allocation to a process or for system use. It is equal to the sum of memory assigned to the standby (cached), free and zero page lists.
Memory_AveragePressureSELECT AveragePressure FROM Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVMShows the average pressure in the VM.
Memory_HypervisorPartitionDepositedPagesSELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total'Shows the number of pages deposited into the partition.
Memory_HypervisorPartitionValue2MGPApagesSELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total'Shows the number of 2M pages present in the GPA space of the partition.
Memory_HypervisorPartitionVirtualProcessorsSELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total'Shows the number of virtual processors present in the partition.
Memory_HypervisorRootPartitionDepositedPagesSELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of pages deposited into the partition. This indicates how much memory the hypervisor is using for managing the VM.
Memory_HypervisorRootPartitionValue2MGPApagesSELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of 2M pages present in the GPA space of the partition. This indicates whether a VM is using large pages, which improves overall VM performance.
Memory_HypervisorRootPartitionVirtualProcessorsSELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of virtual processors present in the partition.
Memory_PagesPerSecondSELECT PagesPersec FROM Win32_PerfFormattedData_PerfOS_MemoryShows the rate at which pages are read from or written to disk to resolve hard page faults. To resolve hard page faults, the operating system must swap the contents of memory to disk, which negatively impacts performance. A high number of pages per second in correlation with low available physical memory may indicate a lack of physical memory.
Memory_PhysicalPagesAllocatedMemory_PhysicalPagesAllocatedShows the number of physical pages not allocated from the preferred NUMA (Non-Uniform Memory Access) node.
LogicalProcessorPercentGuestRunTimeSELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of time spent by the processor in guest code. This is the percentage of time guest code is running on an LP or for the _Total the average percentage across all LPs.
LogicalProcessorPercentHypervisorRunTimeSELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of time spent by the processor in hypervisor code. This is the percentage of time the Hypervisor is running on an LP or for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set.
LogicalProcessorPercentIdleTimeSELECT PercentIdleTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'This monitor returns the percentage of time spent by the processor in an idle state. This is the percentage of time the LP is waiting for work for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set.
LogicalProcessorPercentTotalRunTimeSELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of processor time spent in guest and hypervisor code. This is used to measure the total processor utilization for hypervisor and all VMs running on the host server.
RootVirtualProcessorPercentGuestRunTimeSELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest code. This is used to determine the processor utilization of the virtualization stack on the host server.
RootVirtualProcessorPercentHypervisorRunTimeSELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in hypervisor code. This is used to determine the processor unitization by the hypervisor used by the host (and isn't specific to any VMs).
RootVirtualProcessorPercentTotalRunTimeSELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest and hypervisor code.
VirtualProcessorPercentGuestRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest code.
VirtualProcessorPercentHypervisorRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in hypervisor code.
VirtualProcessorPercentTotalRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'The percentage of time spent by the virtual processor in guest code.
Hypervisor_NumberOfLogicalProcessorsselect * from Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where name != '_Total'Shows the count of logical processors.
Hypervisor_NumberOfVirtualMachinesselect * from Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where name != '_Total'Shows the count of virtual machines.
Hypervisor_NumberOfVirtualProcessorsselect * from Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where name != '_Total'Shows the count of virtual processors.
Hypervisor_TotalPagesselect * from Win32_PerfFormattedData_HvStats_HyperVHypervisorShows the number of bootstrap and deposited pages in the hypervisor. The Hypervisor needs memory in order to keep track of Virtual Processors, Guest Virtual address to System Physical Address translation entries in the virtual TLB, and so on. The total pages keep track of the total amount of memory the Hypervisor is using for management or partitions. A page is 4 KBytes. This is not the total amount used to support a guest. Total Pages can change based on what guests VMs are running.
VMHealthSummarySelect HealthCritical, HealthOk from Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryThis counter represents the number of virtual machines that with critical and ok health. HealthCritical:This counter represents the number of virtual machines that have critical health. If anything is critical it means some resource, (most likely a disk), has been exhausted or some other unrecoverable error has occurred. If you see “Health Critical” you should take action to figure out what has happened. HealthOK: This counter represents the number of virtual machines with health that is ok.
CurrentDiskQueueLengthSELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total'Shows the number of requests outstanding on the disk at the time the performance data is collected. It also includes requests in service at the time of the collection. This is a instantaneous snapshot, not an average over the time interval. Multi-spindle disk devices can have multiple requests that are active at one time, but other concurrent requests are awaiting service. This counter might reflect a transitory high or low queue length, but if there is a sustained load on the disk drive, it is likely that this will be consistently high. Requests experience delays proportional to the length of this queue minus the number of spindles on the disks. For good performance, this difference should average less than two.
Network_Interface_OffloadedConnectionsSelect * from Win32_PerfFormattedData_Tcpip_NetworkInterfaceShows the number of TCP connections (over both IPv4 and IPv6) that are currently handled by the TCP chimney offload capable network adapter.
Memory_HypervisorPartitionVirtualProcessorsSELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total'Shows the number of virtual processors present in the partition.
Memory_HypervisorRootPartitionVirtualProcessorsSELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of virtual processors present in the partition.
LogicalProcessorPercentTotalRunTimeSELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of processor time spent in guest and hypervisor code. This is used to measure the total processor utilization for hypervisor and all VMs running on the host server.
LogicalProcessorPercentGuestRunTimeSELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of time spent by the processor in guest code. This is the percentage of time guest code is running on an LP or for the _Total the average percentage across all LPs.
LogicalProcessorPercentHypervisorRunTimeSELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'Shows the percentage of time spent by the processor in hypervisor code. This is the percentage of time the Hypervisor is running on an LP or for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set.
RootVirtualProcessorPercentTotalRunTimeSELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest and hypervisor code.
VirtualProcessorPercentGuestRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest code.
RootVirtualProcessorPercentGuestRunTimeSELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in guest code. This is used to determine the processor utilization of the virtualization stack on the host server.
VirtualProcessorPercentHypervisorRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in hypervisor code.
RootVirtualProcessorPercentHypervisorRunTimeSELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total'Shows the percentage of time spent by the virtual processor in hypervisor code. This is used to determine the processor unitization by the hypervisor used by the host (and isn't specific to any VMs).
Storage_DiskBytesPersecSELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total'Shows the rate bytes are transferred to or from the disk during write or read operations.
Storage_DiskTransfersPersecSELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total'Shows the rate of read and write operations on the disk.
Storage_VirtualStorageDeviceReadBytesPerSecSELECT ReadBytesPersec FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDeviceShows the total number of bytes that have been read per second on this virtual device.
Storage_VirtualStorageDeviceWriteBytesPerSecSELECT WriteBytesPersec FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDeviceShows the total number of bytes that have been written per second on this virtual device.
Storage_ErrorCountSELECT ErrorCount FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDevice SELECT ErrorCount From Win32_PerfFormattedData_Counters_HyperVVirtualStorageDeviceShows the total number of errors that have occured on this virtual device.
Storage_FlushCountSELECT FlushCount FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDeviceShows the total number of flush operations that have occured on this virtual device.
Network_VirtualNetworkAdapterBytesPerSecSelect BytesPersec from Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapterShows the total number of bytes per second traversing the virtual switch.
Network_VirtualSwitchBytesPerSecSelect BytesPersec from Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitchShows the total number of bytes that have traversed the network adapter.
Memory_HypervisorRootPartitionValue2MGPApagesSELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of 2M pages present in the GPA space of the partition. This indicates whether a VM is using large pages, which improves overall VM performance.
Memory_PhysicalPagesAllocatedSELECT PhysicalPagesAllocated FROM Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition where Name='_Total'shows the number of guest pages and Virtual Infrastructure Driver (VID) pages needed to manage the VM.
Memory_HypervisorRootPartitionDepositedPagesSELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total'Shows the number of pages deposited into the partition. This indicates how much memory the hypervisor is using for managing the VM.
Memory_PagesPerSecondSELECT PagesPersec FROM Win32_PerfFormattedData_PerfOS_MemoryShows the rate at which pages are read from or written to disk to resolve hard page faults. To resolve hard page faults, the operating system must swap the contents of memory to disk, which negatively impacts performance. A high number of pages per second in correlation with low available physical memory may indicate a lack of physical memory.
VirtualProcessorPercentTotalRunTimeSELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total'The percentage of time spent by the virtual processor in guest code.
VMHealthSummarySelect HealthCritical, HealthOk from Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryThis counter represents the number of virtual machines that with critical and ok health. HealthCritical:This counter represents the number of virtual machines that have critical health. If anything is critical it means some resource, (most likely a disk), has been exhausted or some other unrecoverable error has occurred. If you see “Health Critical” you should take action to figure out what has happened. HealthOK: This counter represents the number of virtual machines with health that is ok.
LogicalProcessorPercentIdleTimeSELECT PercentIdleTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total'This monitor returns the percentage of time spent by the processor in an idle state. This is the percentage of time the LP is waiting for work for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set.