Measure-VMResourcePool

Measure-VMResourcePool

Reports resource utilization data for one or more resource pools.

Syntax

Parameter Set: Default
Measure-VMResourcePool [-Name] <String[]> [[-ResourcePoolType] <VMResourcePoolType[]> ] [-ComputerName <String[]> ] [ <CommonParameters>]

Detailed Description

The Measure-VMResourcePool cmdlet reports data on processor usage, memory usage, network traffic, and disk capacity for one or more virtual machine resource pools.

Note: Data is available for reporting by the Measure-VMResourcePool cmdlet only after resource metering is enabled for the virtual machine resource pool or pools.

This cmdlet can also be called with an array of resource pools with the same name. In this case, resource utilization data for different resource types will be aggregated in a single report.

The report has the following fields:
-- ComputerName: The name of the virtual machine host.
-- ResourcePoolType: The type of the virtual machine resource pool.
-- ResourcePoolName: The name of the resource pool.
-- MeteringDuration: The duration over which resource utilization data is being reported.
-- AverageProcessorUsage: The sum of the average processor usage, in megahertz, of the virtual machines under the specified resource pool over the time period reported in the MeteringDuration field.
-- AverageMemoryUsage: The sum of the average memory usage, in megabytes, of the virtual machines under the specified resource pool over the time period reported in the MeteringDuration field.
-- MaximumMemoryUsage: The maximum memory usage, in megabytes, of any virtual machine under the specified resource pool over the time period reported in the MeteringDuration field.
-- MinimumMemoryUsage: The minimum memory usage, in megabytes, of any virtual machine under the specified resource pool over the time period reported in the MeteringDuration field.
-- TotalDiskAllocation: The maximum disk capacity, in gigabytes, allocated to any virtual machine under the specified resource pool over the time period reported in the MeteringDuration field.
-- NetworkMeteredTrafficReport: An array whose elements report the traffic through each NetworkAdapterAcl on the virtual machines under the specified resource pool over the time period reported in the MeteringDuration field.

Each array element has the following properties:
-- LocalAddress: for an inbound packet, the destination IP address in the packet header; for an outbound packet, the source IP address in the packet header.
-- RemoteAddress: for an inbound packet, the source IP address in the packet header; for an outbound packet, the destination IP address in the packet header.
-- Direction: the direction of the network traffic to which the ACL applies. Allowed values are Inbound, Outbound, or Both.
-- TotalTraffic: the amount of network traffic, in megabytes, through the NetworkAdapterAcl.

Notes:
-- The disk capacity allocated to the virtual machine is reported as the sum of the virtual capacity of the virtual machine’s virtual hard disks, together with the sum of the physical disk capacity of the virtual machine’s virtual hard disk snapshots.
-- Resource utilization information is not available for resource pool types of FiberChannelConnection, FibreChannelPort, VFD, and ISO.
-- If the virtual machines under the specified resource pool are configured with the same values for LocalAddress, RemoteAddress, and Direction, the information from each of these NetworkAdapterAcl objects is aggregated in the TotalTraffic property specified by the NetworkMeteredTrafficReport of the object returned by the Measure-VMResourcePool cmdlet.

Default display of a resource pool resource utilization report includes the following columns:
-- Name: the name of the resource pool.
-- ResourcePoolType: the type of the virtual machine resource pool.
--AvgCPU(Mhz): the sum of the average processor usage, in megahertz, of the virtual machines under the specified resource pool.
-- AvgRAM(M): the sum of the average memory usage, in megabytes, of the virtual machines under the specified resource pool.
-- TotalDisk(G): the maximum disk capacity, in gigabytes, allocated to any virtual machine under the specified resource pool.
-- NetworkInbound(M): total incoming traffic, in megabytes, to the virtual machines under the specified resource pool.
-- NetworkOutbound(M): total outgoing network traffic, in megabytes, to the virtual machines under the specified resource pool.

Parameters

-ComputerName<String[]>

Specifies one or more virtual machine hosts for which resource utilization is to be reported. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer — use "localhost" or a dot (".") to specify the local computer explicitly.

Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies the friendly name of the resource pool for which resource utilization is to be reported.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ResourcePoolType<VMResourcePoolType[]>

Specifies the resource type of the virtual machine resource pool for which resource utilization is to be reported.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.HyperV.PowerShell.VMResourcePoolType[]

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1

This example reports resource utilization data for a resource pool named TestResourcePool.

PS C:\> Measure-VMResourcePool –Name TestResourcePool –ResourcePoolType -Memory

Example 2

This example uses two commands as well as the pipeline. The first command retrieves resource utilization data for a set of resource pools using the Get-VMResourcePool cmdlet, passes the object to the Measure-VMResourcePool cmdlet, and stores that data in a variable named $UtilizationReport. The second command resets resource utilization data for these resource pools so that Hyper-V begins collecting new data for the resource pools.

PS C:\> $UtilizationReport = Get-VMResourcePool –Name “TestResourcePool” –ResourcePoolType @(“Processor”,”VHD”,“Ethernet”,“Memory”) | Measure-VMResourcePool
PS C:\> Get-VMResourcePool –ResourcePoolType @(“Processor”,”VHD”,”Ethernet”,”Memory”) | Reset-VMResourceMetering

Add-VMNetworkAdapterAcl

Disable-VMResourceMetering

Enable-VMResourceMetering

Remove-VMNetworkAdapterAcl

Reset-VMResourceMetering