ShaoHe Feng has posted comments on this change.
Change subject: Add qemu's memory usage to VM statistics. ......................................................................
Patch Set 4: (1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 177: with open('/proc/%d/status' % (self.conf['pid'])) as f: Line 178: for line in f: Line 179: var, value = line.strip().split()[0:2] Line 180: if var in ('VmSize:', 'VmRSS:', 'VmData:'): Line 181: memUsage[var[:-1]] = long(value) Vinzenz: Not need to split command.
As Dan's comment. any change to the API must have a corresponding change to the schema. See "RunningVmStats".
I think it is necessary to explicit the unit symbol in the schema. there a a lot of example in the schema. so the use who call this API can easy to know that the unit symbol is "KB", not "MB" or "GB" Line 182: return memUsage Line 183: Line 184: def _diff(self, prev, curr, val): Line 185: return prev[val] - curr[val]
-- To view, visit http://gerrit.ovirt.org/9006 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ibeb35759454c4a9b41e1303956267e93ca3545a0 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Gal Hammer ghammer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com