Get-EsxTop Command | Vmware PowerCLI Reference

Get-EsxTop

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.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Counter SwitchParameter named
Indicates that you want to retrieve counters information.
optional CounterName String[] named
Specifies the name of the counter for which you want to retrieve information.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • pipeline
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.
Get-EsxTop
[-CounterName < String[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional CounterName String[] named
Specifies the name of the counter for which you want to retrieve information.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • pipeline
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.
Get-EsxTop
-TopologyInfo
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[-Topology < String[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
TopologyInfo SwitchParameter named
Indicates that you want to retrieve topologies of the statistics.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • pipeline
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.
optional Topology String[] named
Specifies the topologies for which you want to retrieve information.

Output

VMware.VimAutomation.ViCore.Types.V1.EsxTop.Counter

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.

Related Commands

ESXImageProfileAssociation

Associates the specified image profile with the specified ESXi system.

EsxCli

This cmdlet exposes the ESXCLI functionality.

EsxImageProfile

EsxSoftwareDepot

EsxSoftwarePackage

EsxTop

This cmdlet exposes the esxtop functionality.