5 for my $iface_path (glob "/sys/class/net/*")
7 my ($iface) = $iface_path =~ /\/([^\
/]+)$/;
9 my $rx_bytes = file_get_int
("$iface_path/statistics/rx_bytes");
10 my $tx_bytes = file_get_int
("$iface_path/statistics/tx_bytes");
13 print "$iface.rx_bytes $rx_bytes";
14 print "$iface.tx_bytes $tx_bytes";