How do I monitor the transfer speed of an interface from a Linux terminal?
I am connecting to a server via SSH, and I'd like to know how fast it's uploading and downloading. Preferably I'd also like to see what is downloading/uploading and the speed for that process. Any suggestions, or hints on what I should be searching for?
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.
iftop
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)
Thanks for your answers!