How do I get the current bandwidth speed of an interface from the terminal?

I want to get the current Bandwidth of an interface say “eth0” from the terminal. It better be as simple as possible. Say
up 10 dn 30.
Instead of giving out a lot of text like “vnstat” does.

Edit: I need this for a command line program for auto-monitoring, not to view it manually.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

There are several tools that can do this.

Bmon

One that should be in most repositories for various distros is bmon.

    ss of bmon

It can be run in a condensed view too.

           ss of bmon small

If you’re looking for something else I’d suggest taking a look at this Linuxaria article titled: Monitor your bandwidth from the Linux shell. It also mentions nload as well as speedometer.

Nload

    ss of nload

Speedometer

            ss of speedometer

Ibmonitor

If you’re looking for something more basic then you could also give ibmonitor a go. Though basic it has most of the features one would expect when monitoring bandwidth.

            ss of ibmonitor

Method 2

You can also use Linux process explorer. It can monitor bandwidth usage per process.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments