154 |
|
|
155 |
foreach ( split(/\n/, $net) ) { |
foreach ( split(/\n/, $net) ) { |
156 |
s/^\s+//; |
s/^\s+//; |
157 |
s/:\s+/:/; |
s/:\s*/ /; |
158 |
my @n = split(/\s+/, $_, 17); |
my @n = split(/\s+/, $_, 17); |
159 |
#next unless ( $n[0] =~ s!(eth\d|ath\d):!! ); |
#next unless ( $n[0] =~ s!(eth\d|ath\d):!! ); |
160 |
next unless $n[1] =~ m{^\d+$}; |
next unless $n[1] =~ m{^\d+$}; |
161 |
|
|
162 |
warn dump( @n ) if ($debug); |
warn dump( @n ) if ($debug); |
163 |
$rx += $n[1]; |
$rx += $n[1]; |
164 |
$tx += $n[8]; |
$tx += $n[9]; |
165 |
} |
} |
166 |
warn "rx: $rx tx: $tx\n" if ($debug); |
warn "rx: $rx tx: $tx\n" if ($debug); |
167 |
|
|