Get-VsanStat

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

Syntax

[-EndTime  <DateTime>]
[-Entity  <VIObjectCore[]>]
[-Name  <String[]>]
[-Server  <VIServer[]>]
[-StartTime  <DateTime>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
EndTime
DateTime named 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.
optional
Entity
VIObjectCore[] named
  • wildcards
  • pipeline
  • Specifies the entity for which you want to retrieve vSAN performance metrics. OBN is supported for the Cluster, VMHost, VirtualMachine, VsanIscsiTarget, and VsanStoragePoolDisk (vSphere 8.0 and later) entity types.
    optional
    Name
    String[] named
  • wildcards
  • 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, Capacity VMHost: Backend, VMConsumption, HostNetwork, HostIscsi VirtualMachine: Performance HardDisk: VirtualDisk, Vscsi VsanDisk: Performance VsanDiskGroup: Performance VsanStoragePoolDisk: Performance VsanIscsiTarget: Performance VsanIscsiLun: Performance HostVirtualNic: Performance PhysicalNic: Performance VsanFileShare: Performance
    optional
    Server
    VIServer[] named
  • 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 the Connect-VIServer cmdlet.
    optional
    StartTime
    DateTime named Specifies the client local time from which you want to retrieve statistics. The returned samples do not include the sample at StartTime.

    -PredefinedTimeRange  <VsanPredefinedTimeRange>
    [-Entity  <VIObjectCore[]>]
    [-Name  <String[]>]
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    PredefinedTimeRange
    VsanPredefinedTimeRange named 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.
    optional
    Entity
    VIObjectCore[] named
  • wildcards
  • pipeline
  • Specifies the entity for which you want to retrieve vSAN performance metrics. OBN is supported for the Cluster, VMHost, VirtualMachine, VsanIscsiTarget, and VsanStoragePoolDisk (vSphere 8.0 and later) entity types.
    optional
    Name
    String[] named
  • wildcards
  • 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, Capacity VMHost: Backend, VMConsumption, HostNetwork, HostIscsi VirtualMachine: Performance HardDisk: VirtualDisk, Vscsi VsanDisk: Performance VsanDiskGroup: Performance VsanStoragePoolDisk: Performance VsanIscsiTarget: Performance VsanIscsiLun: Performance HostVirtualNic: Performance PhysicalNic: Performance VsanFileShare: Performance
    optional
    Server
    VIServer[] named
  • 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 the Connect-VIServer cmdlet.

    Output

    VMware.VimAutomation.Storage.Types.V1.Vsan.Performance.VsanStatSample

    Examples


    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.

    Example 15

    $vsanstoragepooldisks = Get-VsanStoragePoolDisk -vmhost 10.184.92.93
    Get-VsanStat -Entity $vsanstoragepooldisks[0] -TimeRange LastHour

    Queries the vSAN Performance metrics of the specified vSAN storage pool disk in the last hour. Note: The VsanStoragePoolDisk entity type is available from vSphere 8.0.

    Related Commands

    Feedback

    Was this page helpful?