VMware Cloud Community
JindiJee
Contributor
Contributor
Jump to solution

ESX Cluster Memory Stats | Total, Avail, Allocated, Used...

Before I go out and try to write a script that does the following I wanted to know if anyone has already written something similar:

  • Gather total amount of RAM in each
    ESX Cluster minus the total RAM allocated to VMs in the cluster.

  • For example, if
    there is 32GB RAM available in a cluster and there are four 1GB VMs and two 2GB VMs running then we have 20GB of RAM remaining to support 20 1GB VMs.

  • Pull the amount of memory allocated to a VMs versus the amount actually being used as a metric as well.

Thanks

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I'm not sure if you should calculate the available memory to the VMs like that.

Not all the memory in a cluster is available for running VMs.

And a VM doesn't always take the full amount of memory that you configured it with from the available memory in the cluster.

And this of course changes over time depending on the activity of the VMs.

Have a look at and check if the script in there doesn't make more sense for what you are trying to get.


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

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

I'm not sure if you should calculate the available memory to the VMs like that.

Not all the memory in a cluster is available for running VMs.

And a VM doesn't always take the full amount of memory that you configured it with from the available memory in the cluster.

And this of course changes over time depending on the activity of the VMs.

Have a look at and check if the script in there doesn't make more sense for what you are trying to get.


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

0 Kudos
JindiJee
Contributor
Contributor
Jump to solution

Luc, these are excellent points which I did not take into consideration. I will take a look at your suggested script. Thanks.

BTW, I have said thanks to you so many times now I feel like it's become almost useless. If I ever meet you in person you'd better be hungry and thirsty because I'm taking you out for a nice meal. That is the least I could do!

Did I mention that I am grateful for all of your help Smiley Wink

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Forgot to mention, have a look in the Performance community.

There is a lot of valuable info available on these kind of subjects.


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

0 Kudos