NeenaJim
Contributor
Contributor

ESXi average usage

Jump to solution

Is there a way we can script the average usage of ESXi hosts per week (CPU and Memory)?

I was searching this in this thread, but not seeing what exactly I wanted. 

https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-stat-each-esx-physcial-CPU-usage/t...

 

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

It depends on which Statistics level you have defined for the Historical intervals on your vCenter.
If that is not at level 4 for Historical interval 2 (1 week retention), you will not have the Minimum and Maximum values.
You can get the meximum and minimum of the Average values, but that will not show as much details as the actual Minimums and Maximums.
Also note that metrics are aggregated, meaning that metrics for the last week will be over 30 minute intervals.

You can read up on all this in PowerCLI & vSphere statistics – Part 1 – The basics


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

View solution in original post

5 Replies
LucD
Leadership
Leadership

So what do you want to see?


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

0 Kudos
NeenaJim
Contributor
Contributor

Trying to get an excel sheet something like below for the calculation of past 7 days. Do you think it can achievable ?

NeenaJim_0-1668299757326.png

 

As always thank you so much for helping me @LucD (Scripting GURU)

0 Kudos
LucD
Leadership
Leadership

It depends on which Statistics level you have defined for the Historical intervals on your vCenter.
If that is not at level 4 for Historical interval 2 (1 week retention), you will not have the Minimum and Maximum values.
You can get the meximum and minimum of the Average values, but that will not show as much details as the actual Minimums and Maximums.
Also note that metrics are aggregated, meaning that metrics for the last week will be over 30 minute intervals.

You can read up on all this in PowerCLI & vSphere statistics – Part 1 – The basics


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

NeenaJim
Contributor
Contributor

Thank you @LucD for notes. 

In this case, Do you think, is this possible to script to generate an excel report like below and automate this on weekly basis ?

NeenaJim_0-1668444033568.png

 

0 Kudos
LucD
Leadership
Leadership

Yes, there are ample examples of such scripts available in this community.

For the scheduling, you will have to decide which scheduler you want to use.


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

0 Kudos