Révision 67d6e559
Read correct values from /proc/net/dev
| plugins/libvirt/kvm_net | ||
|---|---|---|
| 63 | 63 |
f = open("/proc/net/dev", "r")
|
| 64 | 64 |
for line in f.readlines(): |
| 65 | 65 |
if tap in line: |
| 66 |
print "%s_in.value %s" % (vms[pid], re.sub(r"%s:"%tap, "", line.split()[0]))
|
|
| 67 |
print "%s_out.value %s" % (vms[pid], line.split()[8])
|
|
| 66 |
print "%s_in.value %s" % (vms[pid], line.split()[1])
|
|
| 67 |
print "%s_out.value %s" % (vms[pid], line.split()[9])
|
|
| 68 | 68 |
break |
| 69 | 69 |
except Exception as inst: |
| 70 | 70 |
print inst |
Formats disponibles : Unified diff