## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
CounterName | String[] | Specifies the name of the counter for which you want to retrieve information. | false | false
Topology | String[] | Specifies the topologies for which you want to retrieve information. | false | false
Counter | SwitchParameter | Indicates that you want to retrieve counters information. | true | false
Server | VIServer[] | 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. | false | true (ByValue)
TopologyInfo | SwitchParameter | Indicates that you want to retrieve topologies of the statistics. | true | false

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.