10

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.

Ufoguy
  • 1,210
  • 3
  • 13
  • 21

2 Answers2

10

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

slm
  • 363,520
  • 117
  • 767
  • 871
  • 2
    And don't forget [**iftop**](http://www.ex-parrot.com/pdw/iftop/). – n.st Dec 01 '13 at 17:02
  • @n.st - familiar with it, but didn't mention it since he wanted bandwidth methods, and that shows per process, similar to `top`. – slm Dec 01 '13 at 17:07
  • It does display the total bandwidth too, but I'll agree that it's probably less than ideal for automatic evaluation by a script like the OP intends to. – n.st Dec 01 '13 at 17:09
  • 1
    @n.st - yeah that's why I left it out, but I do use it regularly for finding mis-behaving network users 8-) – slm Dec 01 '13 at 17:10
-4

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

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
carl
  • 1