PowerCLI Reference

Get-EsxTop

Synopsis

This cmdlet exposes the esxtop functionality.

Syntax

Get-EsxTop [[-CounterName] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Get-EsxTop [[-CounterName] <String[]>] -Counter [-Server <VIServer[]>] [<CommonParameters>]

Get-EsxTop -TopologyInfo [[-Topology] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Get-EsxCli

Detailed Description

This cmdlet exposes the esxtop functionality. The default parameter set is CounterValues. The Counter parameter filters the specified statistics. To retrieve all available counters, use the CounterInfo parameter set. The properties of each counter are returned through the Fields property (an array) of the CounterInfo output object. You can also retrieve stats topologies using the TopogyInfo parameter set. This information contains either inventory data that does not change or a counter instance structure describing the relationship between different counter instances.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
CounterNameString[]Specifies the name of the counter for which you want to retrieve information.falsefalse
TopologyString[]Specifies the topologies for which you want to retrieve information.falsefalse
CounterSwitchParameterIndicates that you want to retrieve counters information.truefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsetrue (ByValue)
TopologyInfoSwitchParameterIndicates that you want to retrieve topologies of the statistics.truefalse

Return Type

Zero or more Counter, TopologyInfo, or CounterValue objects

Notes

Works only against ESX 4.1 or later.

Examples

-------------- Example 1 --------------

Get-EsxTop -TopologyInfo

Retrieves the available topologies.

-------------- Example 2 --------------

Get-EsxTop -Counter

Retrieves the available counters.

-------------- Example 3 --------------

$vm = Get-VM VM
$group = Get-EsxTop -CounterName SchedGroup | where {$_.VMName -eq $vm.Name}
$groupIDs = $group | select -ExpandProperty GroupID
$gr = Get-EsxTop -TopologyInfo -Topology SchedGroup | %{$_.Entries} | where {$groupIDs -contains $_.GroupId}

$cpuIds = @()
$gr | %{$_.CpuClient} | %{$cpuIds += $_.CPUClientID}

$cpuStats = Get-EsxTop -CounterName 'VCPU' | where {$cpuIds -contains $_.VCPUID}

$cpuStats | fl *

Retrieves statistics for the virtual CPUs of the specified virtual machine.


Copyright © VMware, Inc. All rights reserved.