mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-25 06:03:55 +03:00
domain: Fix memory stats for shutoff VM (bz 1215453)
memory doesn't have a separate input/output stats, so we shouldn't use the in_out_vector_helper. This resulted in shutoff VMs appearing to still use memory in the manager window.
This commit is contained in:
parent
feb9c7e9b2
commit
848123e6c8
@ -1699,8 +1699,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
cpudata = cpudata[0:limit]
|
||||
return cpudata
|
||||
def memory_usage_vector_limit(self, limit):
|
||||
return self.in_out_vector_limit(self.stats_memory_vector(),
|
||||
limit)
|
||||
data = self.stats_memory_vector()
|
||||
if len(data) > limit:
|
||||
data = data[0:limit]
|
||||
return data
|
||||
def network_traffic_vector_limit(self, limit, ceil=None):
|
||||
return self.in_out_vector_limit(self.network_traffic_vector(ceil),
|
||||
limit)
|
||||
|
Loading…
x
Reference in New Issue
Block a user