Hi,
I've been reading up a lot of the resources that are available on PowerCLI reporting. It seems that get-stat is the main engine behind performance statistics reporting in PowerCLI. However I am attempting to replicate the "Report Performance..." menu-pick (which is available when you right-click on a VM or host in the vSphere client) and have been unable to do this. I want to be able to export to XLS as can be done from "Report Performance..." and also specify time intervals etc. Is there any one-to-one correlation between get-stat and "Report Performance..."?
Based on what I have read to date (e.g. parts 1 to 4 of http://www.lucd.info/2009/12/30/powercli-vsphere-statistics-part-1-the-basics/ and elsewhere), get-stat requires a lot of 'massaging' e,g, output must be redirected (and possibly formatted in advance) as by default it goes to the screen.
Any thoughts on what is the easiest way to do what I am attempting via PowerCLI?
Thanks,
number1vspherefan.
There is afaik no one-to-one documentation (yet) with the Report Performance option in the vSphere client and the Get-Stat cmdlet(s) to be used.
On the toher hand with the spreadsheets produced from the vSphere client and the information available on the PerformanceManager page under the Performance Counters section, it is, in my opinion, not too hard to translate the spreadsheet in a Get-Stat cmdlet and its parameters.
Let's take for example the CPU sheet from the ESX(i) server spreadsheet:
The hardest part, in my opinion, is to find the metrics you need to pass to the Get-Stat cmdlet.
I suspect explaining these spreadsheets in Get-Stat statements and how to create the XLS from the returned values would be a good 'part 5' in my Statistics series 🙂
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD .... I'll keep an eye out for Part 5 so . I'm gonna try to play around with this, will post back here if I make any progress.