[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Added missing memory reporting into python bindings



Two types of memory stats were not reported by python bindings. This
patch fixes both of them.
---
 python/libvirt-override.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/python/libvirt-override.c b/python/libvirt-override.c
index 18849f8..289a9bb 100644
--- a/python/libvirt-override.c
+++ b/python/libvirt-override.c
@@ -258,6 +258,12 @@ libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
         else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
             PyDict_SetItem(info, libvirt_constcharPtrWrap("available"),
                            PyLong_FromUnsignedLongLong(stats[i].val));
+        else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON)
+            PyDict_SetItem(info, libvirt_constcharPtrWrap("actual"),
+                           PyLong_FromUnsignedLongLong(stats[i].val));
+        else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_RSS)
+            PyDict_SetItem(info, libvirt_constcharPtrWrap("rss"),
+                           PyLong_FromUnsignedLongLong(stats[i].val));
     }
     return info;
 }
--
1.7.3.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]