aboutsummaryrefslogtreecommitdiffstats
path: root/src/monitor.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/monitor.py')
-rw-r--r--src/monitor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/monitor.py b/src/monitor.py
index 8cf3138..53bfdd0 100644
--- a/src/monitor.py
+++ b/src/monitor.py
@@ -213,6 +213,14 @@ class Monitor:
traceback.print_exc()
return net
+ def check_network_accounting(self, iface):
+ """Checks if network accounting was enabled on interface"""
+ try:
+ os.stat("/var/lib/vnstat/%s" % iface)
+ return True
+ except:
+ return False
+
def get_traffic(self, iface, net=None):
"""Get traffic information"""
device_exists=False