VMware Cloud Community
User20000
Enthusiast
Enthusiast
Jump to solution

Monthly IOPS report for one VM

I'm trying to get a monthly IOPS average/peak for a single VM.

Here's part of the command I'm running:

$statsRead = Get-Stat -Stat virtualdisk.numberreadaveraged.average -Entity $vm -Start (get-date).adddays(-30) -IntervalSecs 60

Any interval greater than 2 minutes results in an error, and anything under 2 minutes ends up being 20 seconds.  Basically, I can only get IOPS for the last hour.  Am I missing something, or is that just the limitation of this counter?

Reply
0 Kudos
1 Solution

Accepted Solutions
User20000
Enthusiast
Enthusiast
Jump to solution

According to VMware and my own testing, VM IOPS requires Statistics Level 3.  After raising the level, I'm now able to get IOPS history for longer than an hour.  Thanks for the advice.

View solution in original post

Reply
0 Kudos
11 Replies
LucD
Leadership
Leadership
Jump to solution

Have you been collecting the performance data for that VM for at least 30 days ?

Have the aggregation jobs been running correctly ?

Do you see 30 days of performance data for that counter and for that VM under the Performance tab in the vSphere client ?


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

Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

In the customized Performance Chart for any VM, "Virtual disk" only has Real-Time counters available.

I'm guessing that means virtualdisk.numberreadaveraged won't have any history older than 1 hour.

Is there any other way to get historical IOPS data on a VM, from the vSphere side?

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

So you are connecting directly to the ESXi server I guess ?

On there you will, by default, not find more than around 1 hour (or 1 day if historical data was enabled) of statistical data.

You can eventually make that longer (see Extend performance data to 36 hours with a stand alone host), but not more than 36 hours.

If you want to have reports over 1 month, and when you are not using a vCenter server, you will have to collect the data yourself (scheduled task) on an hourly basis.

And store that data somewhere.


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

Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

LucD wrote:

So you are connecting directly to the ESXi server I guess ?

It's vCenter 5.5, but it must've just been the VM I was connecting to.  A different VM gives me the full time span options under Virtual disk.

In "Real-time", I can see 1 hour of history in the chart.  However, in "Custom, 1 hour", I get no data.  Through trial and error, I found that I can only see up to 29 minutes in the "Custom" timeframe.  I can see the "Past month" charts for other counters.  Just nothing under Virtual disk.

I'm not sure what's going on there.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

When was that VM created ? More than 30 days ago ?

Did the aggregation jobs run correctly ?


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

Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

The VM was created 6 months ago, and the rollup jobs have been running fine (they just ran this morning).

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

But you don't see data under the Performance tab for that specific VM and counter ?


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

Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

I see "Real-time" data for the "Virtual disk" counters on that VM, but nothing is shown for Past day, Past week, etc.  Any of the other counters show historical data.

I tried a couple other VMs in the inventory and got the same results.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Now that is something of a mystery.

These counters are Statistics Level 1, so they should be captured.

IOSP.png

You did check the Statistics Levels I guess.

What numbers are shown ?


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

User20000
Enthusiast
Enthusiast
Jump to solution

All statistics levels are at default settings, and all of the other counters show historical data.  I might have to contact VMware about this one...

Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

According to VMware and my own testing, VM IOPS requires Statistics Level 3.  After raising the level, I'm now able to get IOPS history for longer than an hour.  Thanks for the advice.

Reply
0 Kudos