aboutsummaryrefslogtreecommitdiffstats
path: root/net_monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'net_monitor.py')
-rwxr-xr-xnet_monitor.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/net_monitor.py b/net_monitor.py
index e80fc31..7360f5f 100755
--- a/net_monitor.py
+++ b/net_monitor.py
@@ -272,7 +272,10 @@ class Monitor:
self.ifaces = readnet()
self.enabled_ifaces = []
- for iface in self.ifaces:
+ sorted_ifaces = self.ifaces.keys()
+ sorted_ifaces.sort()
+
+ for iface in sorted_ifaces:
data_in, data_out = get_traffic(iface)
self.ifaces[iface] = {'data_in': 0,
'data_out': 0,