2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Read correct values from /proc/net/dev

This commit is contained in:
Jan Egil Vestbø 2017-09-30 17:44:16 +02:00
parent 621744a6f0
commit 67d6e559ec

View File

@ -63,8 +63,8 @@ def fetch(vms):
f = open("/proc/net/dev", "r")
for line in f.readlines():
if tap in line:
print "%s_in.value %s" % (vms[pid], re.sub(r"%s:"%tap, "", line.split()[0]))
print "%s_out.value %s" % (vms[pid], line.split()[8])
print "%s_in.value %s" % (vms[pid], line.split()[1])
print "%s_out.value %s" % (vms[pid], line.split()[9])
break
except Exception as inst:
print inst