fixed to match exactly the net device in 'net' graph

This commit is contained in:
Jordi Sanfeliu 2014-01-10 10:48:12 +01:00
parent aef7834c58
commit 0f0eafe0f7
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ sub net_update {
open(IN, "/proc/net/dev");
while(<IN>) {
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);
last;
}