VMware Cloud Community
banerian
VMware Employee
VMware Employee

howto/canyou pull totalWriteLatency?

Is it possible to pull totalWriteLatency info for all the LUNs for all the hosts? How?

I've tried every combination of get-vmhost | get-stat -whatever -realtime -maxsamples 1 I can think of. I've also looked in get-datastore but don't see it there either.

Any help would be appreciated.

Thanks,

John

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

I'm afraid that kind of performance data is not available via the current Get-Stat cmdlet.

For counters that show latency you can also go to the esxtop utility.

See the Appendix of the Resource Management Guide.

Luckily you can run esxtop in batch mode and the tool will save the counters in a CSV file.

As a side note, since yesterday there is an excellent presentation available on VI Performance Monitoring in the Developer Community

Definitely worth the time!

Update !

I just noticed the technote on technote_PerformanceCounters-11-03-08.pdf attached to the above presentation includes some new (?) latency related counters. These are kernelwritelatency, devicewritelatency and totalWriteLatency.

This is probably the one you meant ?

But after some testing, the current Get-Stat implementation doesn't seem to support that performance counter.

Most probably because this performance counter requires an instance to be passed, the counter doesn't have an 'aggregate' instance.

The Get-Stat2 function I wrote some time ago allows you to get at the counter.

You can for example use something like this



$esx = Get-View -Id (Get-VMHost <ESX-hostname>).Id
$mystats = ./Get-Stat2.ps1 -entity $esx `
                           -start ([DateTime]"2008-12-23 23:00") `
                           -finish ([DateTime]"2008-12-24 01:00") `
                           -instance "vmhba32:7:0" `
                           -stat disk.totalWriteLatency.average `
                           -interval RT
$mystats

Note that you have to pass 1 or more paths with the -instance parameter.

Message was edited by: LucD


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
banerian
VMware Employee
VMware Employee

Bump - has this been added to v1.5?

I'm trying &gt;&gt; get-vmhost | get-stat -stat disk.deviceLatency.average -realtime -maxsamples 1

And getting "The metric counter disk.devicelatency.average" doesn't exist ....

Ultimately I'd like to get Disk Command Latency as shown in VC, but I'll take any Latency I can get.

Thanks,

John

Reply
0 Kudos
LucD
Leadership
Leadership

The problem is that currently the Get-Stat cmdlet doesn't support "instances" yet.

That's one of the reasons why I wrote my Get-Stat2 script.

All the latency metrics require an instance !

These are the disk latency related metrics that are currently available.

Btw this comes from the spreadsheet I included in .

!metric-latency.png!

This will work (but not with the current Get-Stat cmdlet)


$esx = Get-VMHost <ESX-server-name> | Get-View

./Get-Stat2.ps1 -entity $esx `
		-stat disk.deviceReadLatency.average `
		-instance "vmhba32:7:1" `
		-interval RT `
		-maxsamples 1

Note1: that most latency-related metrics only have the "average" rollup.

The minimum and maximum values you see in the VI client are most probably produced by the VC.

Note2: while testing this I discovered a bug in the -maxsamples parameter.

I will publish an updated version of the script later today.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos