< Back

Get-VsanStat

Sun Jan 19, 2020 7:17 pm

NAME Get-VsanStat



SYNOPSIS

This cmdlet retrieves vSAN performance statistics for the specified server entity.





SYNTAX

Get-VsanStat [[-Name] <String[]>] [-Entity <VIObjectCore[]>] [-StartTime <DateTime>] [-EndTime <DateTime>]

[-Server <VIServer[]>] [<CommonParameters>]



Get-VsanStat [[-Name] <String[]>] [-Entity <VIObjectCore[]>] [-Server <VIServer[]>] -PredefinedTimeRange

<VsanPredefinedTimeRange> [<CommonParameters>]





DESCRIPTION

This cmdlet retrieves vSAN performance statistics for the specified server entity.





PARAMETERS

-Name <String[]>

Specifies the performance metrics you want to retrieve. If not specified, all the metrics are returned. The

value is in the format 'ViewName.MetricName'.



ViewName is applicable to different entity types: Cluster: Backend, VMConsumption VMHost: Backend,

VMConsumption, HostNetwork, HostIscsi VirtualMachine: Performance HardDisk: VirtualDisk, Vscsi VsanDisk:

Performance VsanDiskGroup: Performance VsanIscsiTarget: Performance VsanIscsiLun: Performance



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Entity <VIObjectCore[]>

Specifies the entity for which you want to retrieve vSAN performance metrics. OBN is supported for the

Cluster, VMHost, VirtualMachine, and VsanIscsiTarget entity types.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-StartTime <DateTime>

Specifies the client local time from which you want to retrieve statistics. The returned samples do not

include the sample at StartTime.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EndTime <DateTime>

Specifies the client local time up to which you want to retrieve statistics. If the specified value is later

than current server time, the value is replaced by the current server time. The returned samples include the

sample at EndTime.



Required? false

Position? named

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 given to this

parameter, the command runs on the default servers. For more information about default servers, see the

description of the Connect-VIServer cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-PredefinedTimeRange <VsanPredefinedTimeRange>

A list of predefined time ranges (Last5Minutes, Last15Minutes, Last30Minutes, LastHour, Last24Hours, LastWeek)

provides a more efficient way to specify time range in querying vSAN performance metric than using the

StartTime and EndTime parameters.



Required? true

Position? named

Default value None

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 VsanStatSample objects







NOTES









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



$diskGroups = Get-VsanDiskGroup -Cluster "vsan-cluster"

Get-VsanStat -Entity $diskGroups



Retrieves all vSAN performance samples for vSAN disk groups of the "vsan-cluster" cluster.

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



Get-VsanStat -Entity "vsan-cluster" -Name "Backend.ReadThroughput"



Retrieves vSAN performance samples for backend read throughput of the "vsan-cluster" cluster.

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



$cluster = Get-Cluster -Name "vsan-cluster"

Get-VsanStat -Entity $cluster -Name VMConsumption.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats relevant to the VM consumption view of the "vsan-cluster" cluster in the $startTime

to $endTime local time range.

-------------------------- Example 4 --------------------------



$cluster = Get-Cluster -Name "vsan-cluster"

Get-VsanStat -Entity $cluster -Name Backend.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats relevant to the backend view of the "vsan-cluster" cluster in the $startTime to

$endTime local time range.

-------------------------- Example 5 --------------------------



Get-VsanStat -Entity $iscsiTarget -Name Performance.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats of the $iscsiTarget target in the $startTime to $endTime local time range.

-------------------------- Example 6 --------------------------



Get-VsanStat -Entity $iscsiLUN -Name Performance.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats of the $iscsiLUN iSCSI LUN in the $startTime to $endTime local time range.

-------------------------- Example 7 --------------------------



Get-VsanStat -Entity $vmhost -Name VMConsumption.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats relevant to the VM consumption view of the $vmHost host in the $startTime to

$endTime local time range.

-------------------------- Example 8 --------------------------



Get-VsanStat -Entity $vmhost -Name Backend.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats relevant to the backend view of $vmHost host in the $startTime to $endTime local

time range.

-------------------------- Example 9 --------------------------



Get-VsanStat -Entity $diskGroup -Name Performance.ReadCacheWriteIops -StartTime $startTime -EndTime $endTime



Retrieves the read cache write IOPS stats of the $diskGroup vSAN disk group in the $startTime to $endTime local

time range.

-------------------------- Example 10 --------------------------



Get-VsanStat -Entity $disk -Name Performance.DeviceReadIops -StartTime $startTime -EndTime $endTime



Retrieves the device read IOPS stats of the $disk vSAN disk in the $startTime to $endTime local time range.

-------------------------- Example 11 --------------------------



Get-VsanStat -Entity $vmhost -Name HostNetwork.NetworkInboundThroughput -StartTime $startTime -EndTime $endTime



Retrieves the network inbound throughput stats relevant to the VMKernel adapter aggregation of $vmHost host in the

$startTime to $endTime local time range.

-------------------------- Example 12 --------------------------



Get-VsanStat -Entity "MyVM" -Name Performance.ReadIops -StartTime $startTime -EndTime $endTime



Retrieves the read IOPS stats of "MyVM" virtual machine in the $startTime to $endTime local time range.

-------------------------- Example 13 --------------------------



Get-VsanStat -Entity $hardDisk -Name VirtualDisk.IopsLimit -StartTime $startTime -EndTime $endTime



Retrieves the IOPS limit stats of the $hardDisk virtual hard disk in the $startTime to $endTime local time range.

-------------------------- Example 14 --------------------------



Get-VsanStat -Entity $cluster -Name Backend.ReadIops -TimeRange LastHour



Queries the vSAN Performance metric Backend.ReadIops in the last hour.



RELATED LINKS

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