# How do I monitor the transfer speed of an interface from a Linux terminal?

-

To get a more specific breakdown of traffic, I use tcpdump and pass the dump to wireshark. Then use the statistics menu. But for ssh, it will be hard to see what is going on since it is already encrypted. Do you just want to the speed of your transfers? rsync --progress -av srouce/ dest/ will do that.

Or maybe you want: IP/Process based bandwidth usage stats tool for linux?

If you don't want to install anything, you can cat /proc/net/dev over an interval (Maybe in a loop with sleep), and then just take the difference of the send and receive bytes between the two polling.

For a program, I liked apt-get install bmon. bmon is a nice little terminal curses program.

-
Oops, read to quickly, didn't see you wanted per process :-/ –  Kyle Brandt Dec 2 '09 at 19:32
Woah, bmon is neat! To be honest, per process was just a nice-to-have. –  nbolton Dec 2 '09 at 19:54
-
Nice, not sure which I like better, iftop or bmon. –  nbolton Dec 2 '09 at 20:06

Or if you don't have root access, the data is stored in /proc/net/dev. Little hacked up python script I wrote a bunch of years ago to do it w/o pcap/root.

-

Just to summarize from Kyle Brandt and Flow's answers. I just compared bmon and iftop (both installable using apt-get on Debian). Both are ncurses applications, and are really quite neat!

• bmon gives only a general usage, but has a pretty graph :)
• iftop shows detailed usage between each connection (and shows source/dest ips)