提交 5a4ed59a 编写于 作者: M Martin Kletzander 提交者: Eric Blake

Added missing memory reporting into python bindings

Two types of memory stats were not reported by python bindings. This
patch fixes both of them.
上级 c700613b
......@@ -259,6 +259,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册