Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to write a shell (bash) script that prints the system's download and/or upload capacities (in Kbps):

# Get download bandwidth

> 556 Kbps download bandwidth

# Get upload bandwidth

> 374 Kbps upload bandwidth

I can take care of the boilerplate stuff (validating arguments for input, formatting and printing output, etc.), however I'm clueless what to use for actually querying the system for the bandwidth values. Thanks in advance!

share|improve this question

iperf might be a start (I don't know if it works over the internet - I see no reason for it not to work):

Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.

share|improve this answer
Thanks @Renan (+1) - definitely something worth looking at, but I was sort of hoping to find something baked into the distro. There aren't any "standard" Linux tools that provide this kind of information? Thanks again! – pnongrata Dec 23 '12 at 23:33
@pnongrata As far as I know, no. – Renan Dec 24 '12 at 0:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .