deawrias

show traffic use on interface

Feb 4th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. while true; do cat /proc/net/dev; sleep 1; done | awk -v dc="date \"+%T\"" '/wlan0/{i = $2 - oi; o = $10 - oo; oi = $2; oo = $10;dc|getline d; close(dc); if (a++) printf "%s %8.2f KiB/s in %8.2f KiB/s out\n", d, i/1024, o/1024}'
Advertisement
Add Comment
Please, Sign In to add comment