Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 229504

Stats for Each Datastore

$
0
0

I am trying to write a script to determine the average read and write rates, average number of read and write requests, and average read and write latency for each datastore.

 

I've tried doing it two different ways with 0 as my ending numbers.

 

$startdate = (Get-Date -Hour 7 -Minute 0 -Second 0).AddDays(-1)

$enddate = (Get-Date)

 

$datastores = get-datastore

 

foreach ($DS in $datastores){

     #1

     $dswriterate = [string]([Math]::Round((($DS.datastore.write.average | Measure-Object Value -Average).Average),2))

 

     #2

     $dswriterate = [string]([Math]::Round((($DS.write.average | Measure-Object Value -Average).Average),2))

}

 

I understand that Get-Stat does not work with a datastore as an entity.  It would be great if I could receive help with this!


Viewing all articles
Browse latest Browse all 229504

Trending Articles