mirror of https://github.com/mikaku/Monitorix.git
fixed to match exactly the net device in 'net' graph
This commit is contained in:
parent
aef7834c58
commit
0f0eafe0f7
|
@ -192,7 +192,7 @@ sub net_update {
|
||||||
open(IN, "/proc/net/dev");
|
open(IN, "/proc/net/dev");
|
||||||
while(<IN>) {
|
while(<IN>) {
|
||||||
my ($dev, $data) = split(':', $_);
|
my ($dev, $data) = split(':', $_);
|
||||||
if($dev =~ /$nl[$n]/) {
|
if(trim($dev) eq /$nl[$n]/) {
|
||||||
($net_bytes_in[$n], $net_packs_in[$n], $net_error_in[$n], undef, undef, undef, undef, undef, $net_bytes_out[$n], $net_packs_out[$n], $net_error_out[$n]) = split(' ', $data);
|
($net_bytes_in[$n], $net_packs_in[$n], $net_error_in[$n], undef, undef, undef, undef, undef, $net_bytes_out[$n], $net_packs_out[$n], $net_error_out[$n]) = split(' ', $data);
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue