Linux: Get Realtime Bandwidth Statistics Using Stock Commands

linux-penguin

Have you ever been in Linux and wanted to watch how much bandwidth was going in and out of your box? Most have, and here’s a very simply way to do it without a GUI or installing anything extra:

# watch -n1 "ifconfig eth0 | grep Mb"

RX bytes:105209490 (100.3 Mb)  TX bytes:448524558 (427.7 Mb)

Just change your network interface in the grep bit to the one you want and you’re all set. Oh, and if you’re using Debian or Ubuntu, you may want to try grepping for “Mib” instead of “Mb”.

Enjoy.:

Related posts: