Check Memory Waste Levels

You can check the memory waste levels of a virtual machine host for a specific period of time. For example, you can check the memory waste levels in the last month.

Prerequisites

  • Verify that you are connected to a vRealize Operations Manager instance.
  • Verify that you are connected to the vCenter Server system that is monitored by the vRealize Operations Manager instance.

Procedure

  1. Browse the vCenter Server inventory and select a virtual machine host for which you want to check the memory waste levels.
    $vmHost = Get-VMHost 'MyHost'
  2. Get the vRealize Operations Manager resource that refers to this virtual machine host.
    $hostResource = $vmHost | Get-OMResource
  3. Check the defined metrics for this vRealize Operations Manager resource type.
    Get-OMStatKey -AdapterKind $hostResource.AdapterKind -ResourceKind $hostResource.ResourceKind
  4. Get data for a specific metric.
    $hostResource | Get-OMStat -Key "mem|waste"
    Note: This command retrieves all available metric data with the highest available granularity.
  5. Get metric data for the last month aggregated on a daily basis.
    $hostResource | Get-OMStat -Key "mem|waste" -From ([datetime]::Now.AddMonths(-1)) -IntervalType Days -IntervalCount 1 -RollupType Avg