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

Re: Get NFS performance counters via PowerCLI

$
0
0

If you want to use my Get-Stat2 function, you can do something like this

 

$stat="datastore.totalWriteLatency.average"
$start= (Get-Date).AddDays(-5)

Get-Datastore|where {$_.Type-eq"NFS"} |%{
 
$dsName=$_.Name
 
$uuid=$_.ExtensionData.Info.Url.Split('/')[-2]
 
$_.ExtensionData.Host|%{Get-View$_.Key|
    
Get-Stat2-Stat$stat-Instance$uuid-Start$start-IntervalHI2|
   
SelectTimestamp,CounterName,Interval,Instance,Value,Entity,@{N="Datastore";E={$dsName}}
  }
}

With the regular Get-Stat you can do

 

$stat="datastore.totalWriteLatency.average"
$start= (Get-Date).AddDays(-5)

Get-Datastore|where {$_.Type-eq"NFS"} |%{
 
$dsName=$_.Name
 
$uuid=$_.ExtensionData.Info.Url.Split('/')[-2]
 
Get-VMHost-Datastore$_|
   
where {$_.Instance-eq$uuid} |
   
SelectTimestamp,MetricId,IntervalSecs,Instance,Value,@{N="Entity";E={$_.Entity.Name}},@{N="Datastore";E={$dsName}}
}

Viewing all articles
Browse latest Browse all 228891

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>