Dear Experts,
I need to automatically generate a monthly performance report on the average and the maximum usage of the resource pool cpu, using PowerCLI.
I am new to this (PowerCLI and Powershell) so I might not be making much sense but here is my environment and what I want to do.
Environment
In my environment there is 1 vCenter Server, 3 clusters, about 5 resource pools on each cluster and several virtual machines. Lets say that the names of each cluster and resource pools are “cluster1, cluster2, cluster3” and “rp1, rp2, rp3…rp15”.
The statistic level on the vCenter Server is level 4 (all metrics) and 5 minute interval data is saved in the vCenter Server for 5 days. I need to retrieve data for the following counters.
“cpu.usagemhz.average" and "cpu.usagemhz.maximum" in a 5 minute interval. I am only interested in the aggregated data.
What I want to do
Header 1 | Header 2 | Header 3 | Header 4 | Header 5 |
---|---|---|---|---|
TimeStamp | Value | Unit | MetricId | Entity |
2013/3/7 00:00 | 293 | MHz | cpu.usagemhz.average | rp1 |
2013/3/7 00:05 | 279 | MHz | cpu.usagemhz.average | rp1 |
2013/3/7 00:10 | 300 | MHz | cpu.usagemhz.average | rp1 |
2013/3/7 00:00 | 500 | MHz | cpu.usagemhz.maximum | rp1 |
2013/3/7 00:05 | 550 | MHz | cpu.usagemhz.maximum | rp1 |
2013/3/7 00:10 | 600 | MHz | cpu.usagemhz.maximum | rp1 |
All of this doesn’t have to be all in one script. More automation the better.
Any help will be appreciated. Thanks!
I will attach files for better chart view.
Sorry forgot to write about my vSphere version.
I am using vSphere 4.0 Enterprise Edition. ESX is 4.0 update 4
Powershell is running on 2.0 and PowerCLI on 5.1 release 1.