I want to use the get-stat command to measure the virtual disks of virtual machines, such as reads and writes. is there any specific counters I can use to measure this. I want to move some of the virtual disks to some faster datastores (LUNS), but i want to check which virtual disks are slow on reads and writes. Can this be checked via get-stat.
Hi,
You can try below snippet, this will give disk read and write info of a VM
get-vm |Get-Stat -Disk -MaxSamples 10
Hope this helps
Afaik it is not possible to get performance information about individual disks of virtual machines. You can however get the performance information of individual LUNs of an ESX server, if you connect directly to the ESX server. For example:
Connect-VIServer YourESXserverName Get-Stat -Disk
Robert
Message was edited by: RvdNieuwendijk
$filename = "vm-disk-usage-average" echo "Collecting VM Disk Usage usage ladt 24 Hours" $table = @() $vms = @((Get-VM | where {$_.PowerState -eq "PoweredOn"}) | Sort Name) foreach ($VM in $VMs){ Get-Stat -Entity $vm -Stat disk.usage.average -maxsamples 24 -intervalMins 60 | %{ $Details = "" | select VM, VMhost, Time, Usage_KBps $Details.VM = $VM.Name $Details.VMhost = $VM.host $Details.Time = $_.Timestamp $Details.Usage_KBps = $_.Value $table += $Details } } $table | Export-Csv c:\disk usage.csv -NoTypeInformation
This is what I use to get them when doing a health check. This will only do the VMs thou.
As it is it will get 24 figures at 60 min gaps. will give you two days worth of stats.
You can change the "-maxsamples and -intervalmins to the figures you need.
hope this helps
Phil