[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Cleanup old domains in statistics monitor.
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Date 1169653858 0 # Node ID e4d415692ba5994b20a6833bbc609c69975beffc # Parent f000f963bbfdb27c4f289227d0183cb00bab6672 [XEND] Cleanup old domains in statistics monitor. Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/python/xen/xend/XendMonitor.py | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) diff -r f000f963bbfd -r e4d415692ba5 tools/python/xen/xend/XendMonitor.py --- a/tools/python/xen/xend/XendMonitor.py Wed Jan 24 15:50:02 2007 +0000 +++ b/tools/python/xen/xend/XendMonitor.py Wed Jan 24 15:50:58 2007 +0000 @@ -220,10 +220,11 @@ class XendMonitor(threading.Thread): while True: self.lock.acquire() try: - + active_domids = set() # Calculate utilisation for VCPUs for domid, cputimes in self._get_cpu_stats().items(): + active_domids.add(domid) if domid not in self._domain_vcpus: # if not initialised, save current stats # and skip utilisation calculation @@ -310,6 +311,19 @@ class XendMonitor(threading.Thread): self.pifs_util[pifid] = (rx_util, tx_util) self.pifs[pifid] = stats + for domid in self.domain_vcpus_util.keys(): + if domid not in active_domids: + del self.domain_vcpus_util[domid] + del self.domain_vcpus[domid] + for domid in self.domain_vifs_util.keys(): + if domid not in active_domids: + del self.domain_vifs_util[domid] + del self.domain_vifs[domid] + for domid in self.domain_vbds_util.keys(): + if domid not in active_domids: + del self.domain_vbds_util[domid] + del self.domain_vbds[domid] + finally: self.lock.release() _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |