diff options
Diffstat (limited to 'src/monitor.py')
-rw-r--r-- | src/monitor.py | 8 |
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 |