Measure-VMResourcePool

Measure-VMResourcePool

Reports resource utilization data for one or more resource pools.

構文

Parameter Set: Default
Measure-VMResourcePool [-Name] <String[]> [[-ResourcePoolType] {Ethernet | Memory | Processor | VHD}[] ] [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [ <CommonParameters>]

詳細説明

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.

パラメーター

-CimSession<Microsoft.Management.Infrastructure.CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-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

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Credential<System.Management.Automation.PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Name<String[]>

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

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-ResourcePoolType<VMResourcePoolType[]>

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

-- Ethernet
-- Memory
-- Processor
-- VHD

Aliases

none

必須/オプション

false

位置

2

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.HyperV.PowerShell.VMResourcePoolType[]

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

使用例

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