is there a way to enumerate the memory overhead of a vm without using the GUI?
I would like to get the information over VI Toolkit.
any ideas?
Yes, you could, for example, do it like this:
Get-VM <VM-name> | Get-Stat -Stat mem.overhead.average -Start (Get-Date).adddays(-1) -Finish (Get-Date) -MaxSamples 48 -IntervalMins 30
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
our discussion has been moved to the VI Toolkit (for Windows) forum
Dave Mishchenko
VMware Communities User Moderator
Yes, you could, for example, do it like this:
Get-VM <VM-name> | Get-Stat -Stat mem.overhead.average -Start (Get-Date).adddays(-1) -Finish (Get-Date) -MaxSamples 48 -IntervalMins 30
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So when i look at the output it's not the same what i see in the GUI.
Why is that?
I also thought the Memory Overhead is fix.
In the ressource management it a table that shows the overhead for VMs with X vCPUs and X Memory and 32Bit or 64 Bit GuestOS.
Depends what type of statistics you are looking at in the GUI.
If you select "realtime" in the GUI the cmdlet should be
Get-VM <VM-name> | Get-Stat -Stat mem.overhead.average -Start (Get-Date).adddays(-1) -Finish (Get-Date) -MaxSamples 100 -Realtime
Also take into account that the date/time the Get-Stat returns is in UTC while the VI Client shows local time.
Memory overhead for guest is not fixed afaik, it can change during the life of the guest.
I'm not sure to which Resource Mgmt table you are referring, could you give a pointer ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Page 142,
but you're right. I thought it's fixed. But after reading it again i understand it's not
And one more thing. Is there a list of all "MetricId"
with:
get-vm <vmname> | Get-Stat -memory i only get those Ids:
MetricId
-
mem.usage.average
mem.granted.average
mem.active.average
mem.vmmemctl.average
thanks!
You can find a list of the metrics in the SDK Programming Guide appendix A.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference