[Kimchi-devel] [PATCH] Patched kimchi for psutils 3.0.1

stephan.conrad at gmail.com stephan.conrad at gmail.com
Fri Jun 26 06:50:27 UTC 2015


From: Stephan Conrad <stephan.conrad at gmail.com>

---
 src/kimchi/model/host.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/kimchi/model/host.py b/src/kimchi/model/host.py
index b2fa379..eeee04f 100644
--- a/src/kimchi/model/host.py
+++ b/src/kimchi/model/host.py
@@ -102,7 +102,7 @@ class HostModel(object):
         return res
 
     def lookup(self, *name):
-        cpus = psutil.NUM_CPUS
+        cpus = 0
 
         # psutil is unstable on how to get the number of
         # cpus, different versions call it differently
@@ -118,7 +118,7 @@ class HostModel(object):
                     break
 
         self.host_info['cpus'] = cpus
-        self.host_info['memory'] = psutil.phymem_usage().total
+        self.host_info['memory'] = psutil.virtual_memory().total
         return self.host_info
 
     def swupdate(self, *name):
@@ -248,7 +248,7 @@ class HostStatsModel(object):
         prev_recv_bytes = net_recv_bytes[-1] if net_recv_bytes else 0
         prev_sent_bytes = net_sent_bytes[-1] if net_sent_bytes else 0
 
-        net_ios = psutil.network_io_counters(True)
+        net_ios = psutil.net_io_counters(True)
         recv_bytes = 0
         sent_bytes = 0
         for key in set(netinfo.nics() +
-- 
2.4.4




More information about the Kimchi-devel mailing list