#! @PREFIX@/bin/perl $if = $ARGV[0]; open(NET, "netstat -I $if -b|"); while ($line = ) { chop $line; if ($line =~ m|^.+[\s\t]+\S+[\s\t]+(\w+)[\s\t]+(\w+)$|) { print "$1\n"; print "$2\n"; } } close(NET); open(UP, "uptime|"); while($line = ) { chop $line; if ($line =~ m|^.*up\s+(.+),\s+\d+\suser.*|) { print "$1\n"; } } close(UP); print "$if\n";