Jan 27, 2011 10:35
SLEEP=5; while sleep $SLEEP; do cat /proc/net/dev ; done | sed 's/:/: /' | awk '/eth|lo/ {
printf "%s %010.1f %010.1f\n", $1,
($2-pi[$1])*8/1024/1024/'$SLEEP',
($10 - po[$1])*8/1024/1024/'$SLEEP';
pi[$1]=$2;
po[$1]=$10
}';
interface input_Mbit/sec output_Mbit/sec
tips