There are PowerShell cmdlets that provide space and metric information that can be useful in reporting scenarios.
Use the following command to get all the available cmdlets that have performance in their names:
PS >Get-Command -Module PureStoragePowerShellSDK2 *Performance*
When using the space metric cmdlets, the system space will not have a value as that is only reported at the FlashArray level. To get that information, use the
Get-Pfa2ArrayPerformance.
As an example, we want to see a Volume performance metric rundown for all volumes on an array during a time period of 24 hours (
-starttime and -endtime), with the number of milliseconds between the historical data set at 8 hours (
-resolution). The command would look similar to this:
Get-Pfa2ArrayPerformance -endtime '2020-08-07T01:00:00Z' -starttime '2020-08-06T01:00:00Z' -resolution 28800000
The output from that command can be very long and it contains many fields. To export it to a CSV file for easier viewing and manipulation, use this command:
Get-Pfa2ArrayPerformance -endtime '2020-08-07T01:00:00Z' -starttime '2020-08-06T01:00:00Z' -resolution 28800000 | Export-Csv -Path ‘C:\temp\test.csv'
The same parameters could be used for the
Get-Pfa2ArraySpace cmdlet, as shown below:
Get-Pfa2ArraySpace -Array $FlashArray -endtime '2020-08-07T01:00:00Z' -starttime '2020-08-06T01:00:00Z' -resolution 28800000
This is a listing of performance and space metrics cmdlets that are available in the SDK. Please refer to the Release Notes of any future versions for any updated or added cmdlets.
Array
-
Get-Pfa2ArrayPerformance -
Get-Pfa2ArraySpace
Host
-
Get-Pfa2HostPerformance -
Get-Pfa2HostPerformanceByArray -
Get-Pfa2HostGroupPerformance -
Get-Pfa2HostGroupPerformanceByArray
Pods
-
Get-Pfa2PodSpace -
Get-Pfa2PodPerformance -
Get-Pfa2PodPerformanceByArray -
Get-Pfa2PodPerformanceReplication -
Get-Pfa2PodPerformanceReplicationByArray -
Get-Pfa2PodReplicaLinkLag -
Get-Pfa2PodReplicaLinkPerformanceReplication
Protection Groups
-
Get-Pfa2ProtectionGroupSpace -
Get-Pfa2ProtectionGroupPerformanceReplication -
Get-Pfa2ProtectionGroupPerformanceReplicationByArray
Volumes
-
Get-Pfa2VolumeGroupPerformance -
Get-Pfa2VolumeGroupSpace -
Get-Pfa2VolumePerformance -
Get-Pfa2VolumePerformanceByArray