powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-EsxTop



NAME
Get-EsxTop

SYNOPSIS
Exposes esxtop functionality.

SYNTAX
Get-EsxTop [[-CounterName] ] [-Server ] []

Get-EsxTop [[-CounterName] ] -Counter [-Server ] []

Get-EsxTop -TopologyInfo [[-Topology] ] [-Server ] []


DESCRIPTION
Exposes esxtop functionality. The default parameter set is CounterValues. The Counter parameter filters the specifi
ed statistics. To retrieve all available counters, use the CounterInfo parameter set. The properties of each counte
r 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 chang
e or a counter instance structure describing the relationship between different counter instances.


PARAMETERS
-CounterName
Specify the name of the counter for which you want to retrieve information.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Counter
Indicate that you want to retrieve counters information.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-TopologyInfo
Indicate that you want to retrieve topologies of the statistics.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Topology
Specify the topologies for which you want to retrieve information.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
Counter, TopologyInfo, or CounterValue


NOTES


Works only against ESX 4.0 or above.

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

C:\PS>Get-Esxtop -TopologyInfo


Retrieves the available topologies.





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

C:\PS>Get-Esxtop -Counter


Retrieves the available counters.





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

C:\PS>$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.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-EsxTop.html
Get-EsxCli