blob: e5f5d3bfb392321ffbd857e5571447623cb3e5cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From 21ca284ffe6901b06e1136ce57dc07e0effd2a3e Mon Sep 17 00:00:00 2001
From: Fabian Groffen <grobian@gentoo.org>
Date: Mon, 3 Aug 2015 19:40:59 +0200
Subject: [PATCH 1/2] NetworkCollector: psutil.network_io_counters was renamed
---
src/collectors/network/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/collectors/network/network.py b/src/collectors/network/network.py
index d835162..90c2f59 100644
--- a/src/collectors/network/network.py
+++ b/src/collectors/network/network.py
@@ -96,7 +96,7 @@ def collect(self):
self.log.error('No network metrics retrieved')
return None
- network_stats = psutil.network_io_counters(True)
+ network_stats = psutil.net_io_counters(True)
for device in network_stats.keys():
network_stat = network_stats[device]
results[device] = {}
From 314d6057ca95bae6d3e6369556522574eb905c3f Mon Sep 17 00:00:00 2001
From: Fabian Groffen <grobian@gentoo.org>
Date: Mon, 3 Aug 2015 19:41:20 +0200
Subject: [PATCH 2/2] MemoryCollector: psutil renamed phymem_usage and
virtmem_usage
---
src/collectors/memory/memory.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/collectors/memory/memory.py b/src/collectors/memory/memory.py
index 7c9b1fb..9057115 100644
--- a/src/collectors/memory/memory.py
+++ b/src/collectors/memory/memory.py
@@ -103,8 +103,8 @@ def collect(self):
self.log.error('No memory metrics retrieved')
return None
- phymem_usage = psutil.phymem_usage()
- virtmem_usage = psutil.virtmem_usage()
+ phymem_usage = psutil.virtual_memory()
+ virtmem_usage = psutil.swap_memory()
units = 'B'
for unit in self.config['byte_unit']:
|