Active Memory Usage on VM with PowerCLI

Hi again,

What if you need to know the real Memory Usage for a specific virtual machine and unfortunately there is no vCenter Operations in hand and VM statistics are a bit laggy on vCenter Server?.

It really important to point out the real memory usage for a virtual machine is represented by the Active Memory metric. So this PowerCLI command will help you to show the 5 peaks of Active Memory usage for a specific VM and what time it was recorded:

Get-Stat -Entity VMNAME -Start 20/5/2014 -Finish 01/6/2014 -Memory -IntervalSecs 300 | ? {$_.MetricId -match "active"} | Sort-Object Value -desc | select @{n='VirtualMachine';e={$_.Entity.name}},MetricID,timestamp,value -first 5
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s