Last active
August 29, 2015 14:21
-
-
Save jbfriedrich/48fdf25bc4516f4a235e to your computer and use it in GitHub Desktop.
Powershell script to create a list with read and write IOPS for every Virtual Machine (average and peak values)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Get a list with average and peak IOPS from all VMs | |
# Found at: https://www.linkedin.com/grp/post/3992597-5937675088978534402 | |
## | |
Get-VM | Sort | Select @{N="Name"; E={$_.Name}}, @{N="AvgWriteIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberWriteAveraged.average" -RealTime | Select -Expand Value | measure -average).Average, 1)}}, @{N="PeakWriteIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberWriteAveraged.average" -RealTime | Select -Expand Value | measure -max).maximum, 1)}}, @{N="AvgReadIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberReadAveraged.average" -RealTime | Select -Expand Value | measure -average).Average, 1)}}, @{N="PeakReadIOPS"; E={[math]::round((Get-Stat $_ -stat "datastore.numberReadAveraged.average" -RealTime | Select-Expand Value | measure -max).maximum, 1)}} | Format-Table -autosize | Out-File iops.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment