Add memory.resident libvirt meter for Ceilometer
The 'memory.resident' metric will expose the physical hosts view of the amount of host memory that is actually used to run the VM process DocImpact: https://review.openstack.org/#/c/164724 Change-Id: I9f2ad784479f234679e1145efd96d9d707dd19d0 Implements: blueprint memory-resident
This commit is contained in:
@@ -212,3 +212,8 @@ class LibvirtInspector(virt_inspector.Inspector):
|
||||
physical=block_info[2])
|
||||
|
||||
yield (disk, info)
|
||||
|
||||
def inspect_memory_resident(self, instance, duration=None):
|
||||
domain = self._get_domain_not_shut_off_or_raise(instance)
|
||||
memory = domain.memoryStats()['rss'] / units.Ki
|
||||
return virt_inspector.MemoryResidentStats(resident=memory)
|
||||
|
||||
Reference in New Issue
Block a user