mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
Added missing memory reporting into python bindings
Two types of memory stats were not reported by python bindings. This patch fixes both of them.
This commit is contained in:
parent
c700613b8d
commit
5a4ed59ad9
@ -259,6 +259,12 @@ libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
|||||||
else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
|
else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
|
||||||
PyDict_SetItem(info, libvirt_constcharPtrWrap("available"),
|
PyDict_SetItem(info, libvirt_constcharPtrWrap("available"),
|
||||||
PyLong_FromUnsignedLongLong(stats[i].val));
|
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;
|
return info;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user