Measure-VM

Measure-VM

Reports resource utilization data for one or more virtual machines.

구문

Parameter Set: Name
Measure-VM [-Name] <String[]> [-CimSession <Microsoft.Management.Infrastructure.CimSession[]> ] [-ComputerName <String[]> ] [-Credential <System.Management.Automation.PSCredential[]> ] [ <CommonParameters>]

Parameter Set: VMObject
Measure-VM [-VM] <VirtualMachine[]> [ <CommonParameters>]




자세한 설명

The Measure-VM cmdlet reports data on processor usage, memory usage, network traffic, and disk capacity for one or more virtual machines.

Note: Data is available for reporting through the Measure-VM cmdlet only after resource metering is enabled for a virtual machine.

The report has the following fields:
-- ComputerName: The name of the virtual machine host.
-- VMId: The unique identifier of the virtual machine.
-- VMName: The friendly name of the virtual machine.
-- HardDiskMetrics: Information about the performance and throughput of the storage subsystem.
-- MeteringDuration: The duration over which resource utilization data is being reported.
-- AverageProcessorUsage: The average processor usage, in megahertz, of the virtual machine over the period reported in the MeteringDuration field.
-- AverageMemoryUsage: The average memory usage, in megabytes, of the virtual machine over the period reported in the MeteringDuration field.
-- MaximumMemoryUsage: The maximum memory usage, in megabytes, of the virtual machine over the period reported in the MeteringDuration field.
-- MinimumMemoryUsage: The minimum memory usage, in megabytes, of the virtual machine over the time period reported in the MeteringDuration field.
-- TotalDiskAllocation: The maximum disk capacity, in megabytes, allocated to the virtual machine over the time period reported in the MeteringDuration field. For more information, see the ‘Notes’ following the field descriptions.
-- NetworkMeteredTrafficReport: An array whose elements report the traffic through each NetworkAdapterAcl on the virtual machine or machines over the time period reported in the MeteringDuration field. Each array element has the following properties:
-- NetworkAdapter: The virtual machine network adapter object on which the NetworkAdapterAcl has been configured.
-- 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 two totals -- the total storage capacity of all attached virtual hard disks, and the total amount of physical storage consumed by the virtual machine’s snapshots.
-- If the virtual machine has more than one virtual hard disk, then the TotalDiskAllocation property displays the sum of disk capacity allocated to all virtual hard disks.
-- Resource utilization is not reported for disks attached through a virtual Fiber Channel connection or network adapters configured to use single-root I/O virtualization (SR-IOV).
-- If the virtual machine is configured with static memory rather than Dynamic Memory, then AverageMemoryUsage, MinimumMemoryUsage, and MaxiumumMemoryUsage metrics equals the memory amount configured for the virtual machine.

The default display of a resource pool resource utilization report includes the following columns:
-- VMName: The name of the virtual machine.
-- AvgCPU(Mhz): The average processor usage, in megahertz, of the virtual machine.
-- TotalDisk(M): The average disk usage, in megabytes, of the virtual machine. For more information, see the ‘Notes’ following the field descriptions.
-- NetworkInbound(M): Total incoming network traffic, in megabytes, to the virtual machine.
-- NetworkOutbound(M): Total outgoing network traffic, in megabytes, from the virtual machine.

매개 변수

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

원격 세션이나 원격 컴퓨터에서 cmdlet을 실행합니다. 컴퓨터 이름이나 New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 세션 개체를 입력하세요. 기본값은 로컬 컴퓨터 상의 현재 세션입니다.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

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.


별칭

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.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Name<String[]>

Specifies the friendly name of the virtual machine whose resource utilization data will be reported.


별칭

VMName

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

-VM<VirtualMachine[]>

Specifies the virtual machine whose resource utilization will be reported.


별칭

none

필수 여부

true

위치

1

기본값

none

파이프라인 입력 허용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216)

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

  • Microsoft.HyperV.PowerShell.VirtualMachine[]

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

Example 1

This example reports resource utilization data for a virtual machine named TestVM.


PS C:\> Measure-VM –VMName TestVM

Example 2

This example uses two commands as well as the pipeline. The first command uses the Get-VM cmdlet and passes the object to the Measure-VM cmdlet to retrieve collected resource utilization data for a virtual machine named TestVM, and stores the data in a variable named $UtilizationReport. The second command uses the Reset-VMResourceMetering cmdlet to clear existing data so that Hyper-V begins collecting new data.


PS C:\> $UtilizationReport = Get-VM TestVM | Measure-VM
PS C:\> Get-VM TestVM | Reset-VMResourceMetering

관련 항목

커뮤니티 추가 항목

추가
표시: