Linux::net::dev - Perl extension for parsing /proc/net/dev
use Linux::net::dev; my $devs = Linux::net::dev::info(); print "Devices (bytes read):\n"; foreach (keys %$devs) { print " $_ ($devs->{$_}->{rbytes})\n"; }
Linux::net::dev parses /proc/net/dev for network devices statistics. The package contains these functions:
Recognized resources (data hash keys): rbytes, rcompressed, rdrop, rerrs, rfifo, rframe, rmulticast, rpackets, tbytes, tcarrier, tcolls, tcompressed, tdrop, terrs, tfifo, tpackets,
Resources begining with ``r'' are values for read data, and those begining with ``t'' are values for transmited data.
Package was built and tested on RedHat 7.2, kernel 2.4.7-10 and might not work on some other versions. Please report bugs along with your kernel version (uname -r or uname -a).
/proc/net/dev
Perl 5.000
perl(1).
Vedran Sego, vsego@math.hr