Syntax
Get-EsxTop [[-CounterName] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
Exposes Esx Top 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[] | Specify the name of the counter for which you want to retrieve information. | false | false | |
| Topology | String[] | Specify the topologies for which you want to retrieve information. | false | false | |
| Counter | SwitchParameter | Indicate that you want to retrieve counters information. | true | false | |
| Server | VIServer[] | Specify the vSphere servers on which you want to run the cmdlet. If no value is given 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 | Indicate that you want to retrieve topologies of the statistics. | true | false |
Return Type
Counter, TopologyInfo, or CounterValueNotes
Works only against ESX 4.0 or above.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}
$gr = Get-EsxTop -TopologyInfo -Topology SchedGroup | %{$_.Entries} | where {$_.GroupId -eq $group.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.