< Back

Get-EsxTop

Sun Jan 19, 2020 6:50 pm

NAME Get-EsxTop



SYNOPSIS

This cmdlet exposes the esxtop functionality.





SYNTAX

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



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



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





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

-Counter [<SwitchParameter>]

Indicates that you want to retrieve counters information.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-CounterName <String[]>

Specifies the name of the counter for which you want to retrieve information.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Topology <String[]>

Specifies the topologies for which you want to retrieve information.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-TopologyInfo [<SwitchParameter>]

Indicates that you want to retrieve topologies of the statistics.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more Counter, TopologyInfo, or CounterValue objects







NOTES





Works only against ESX 4.1 or later.



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

Online Version: https://code.vmware.com/doc/preview?id= ... sxTop.html

Get-EsxCli