aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzezinho42 <lists.jjorge@free.fr>2020-05-25 09:20:48 +0200
committerzezinho42 <lists.jjorge@free.fr>2020-05-25 09:20:48 +0200
commitb1fde16a27c11aeb09bf2d48b60ed12dda3de7da (patch)
treec30cb33f7fb31b640d024d1ef1d7d990cc6fe991
parent4db52fb5a8d9cd4c6fd53e7a9019cf01db72bdeb (diff)
downloadnet_monitor-0.27.tar
net_monitor-0.27.tar.gz
net_monitor-0.27.tar.bz2
net_monitor-0.27.tar.xz
net_monitor-0.27.zip
traffic accounting : workaround the fact vnstatd uses a db nowadays0.27
fixes mga#25417
-rw-r--r--Makefile4
-rw-r--r--NEWS3
-rw-r--r--src/monitor.py4
3 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f33b1e4..53bc7f4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
PACKAGE = net_monitor
-VERSION = 0.26
+VERSION = 0.27
GITPATH = git://git.mageia.org/software/net_monitor
all: version python
@@ -22,7 +22,7 @@ install: all
install -m755 scripts/netmonitor_down $(RPM_BUILD_ROOT)/etc/sysconfig/network-scripts/ifdown.d/
cleandist:
- rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
+ rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.xz
dist: cleandist
git archive --prefix $(PACKAGE)-$(VERSION)/ HEAD | xz -9 > $(PACKAGE)-$(VERSION).tar.xz
diff --git a/NEWS b/NEWS
index c9c4b85..91cff71 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ Network monitoring tool -- History of user-visible changes
Copyright (C) 2009, Mandriva
Copyright (C) 2011 and later, Mageia
+0.27:
+- traffic accounting : workaround the fact vnstatd uses a db nowadays
+
0.26:
- connections : display of tcp6 and udp6 ones
diff --git a/src/monitor.py b/src/monitor.py
index ac625e6..21420ad 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -246,9 +246,9 @@ class Monitor:
return net
def has_network_accounting(self, iface):
- """Checks if network accounting was enabled on interface"""
+ """Checks if network accounting was enabled"""
try:
- os.stat("/var/lib/vnstat/%s" % iface)
+ os.stat("/var/lib/vnstat/vnstat.db")
return True
except:
return False