Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 want to know how much bandwidth my server is using. How much in, how much out. How do I know that?

I think there is a software, netstat or something that took care that sort of thing.

share|improve this question
Do you want to know what it's currently using or do you want historical usage too ? – Lawrence Jul 11 '14 at 5:50
Try speedtest.net. It will give you all your required details – Mallikarjuna Sangisetty Jul 11 '14 at 6:29

RRDTool and/or mrtg will do the trick. It stores the tx and rx counters of an interface (or any other metric you wish to provide) in a database and creates nice graphs of it.

enter image description here

Been using it for for years..


share|improve this answer
It's also worth mentioning Cacti to make management/generation of MRTG graphs easier. – Matt Jul 11 '14 at 6:37
And also Munin. A list of applications using RRD is available here: oss.oetiker.ch/rrdtool/rrdworld/index.en.html. – lgeorget Jul 11 '14 at 6:42

I use iftop for a quick view of current bandwidth usage.

iftop can show you the current connections (IP addresses and ports) as well as the current bandwidth that each connection is using.

share|improve this answer

The easiest way to find out how much data has been transmitted over an interface is to issue ifconfig this will list all devices with RX and TX bytes since starting the device.

For an overview of the current bandwidth i recommend bwm-ng.

For a long term observation cacti is the tool of my choice.

share|improve this answer

Another real-time network statistic tool I use on the command-line is iptraf. It shows data like current bandwith, open connections and transmitted packets.

share|improve this answer

I'd take a look at using this package, vnStat which purports to do what you want using the same data that you're looking at from ifconfig.

excerpt of features

  • quick and simple to install and get running
  • gathered statistics persists through system reboots
  • can monitor multiple interfaces at the same time
  • several output options
    • summary, hourly, daily, monthly, weekly, top 10 days
    • optional png image output (using libgd)
  • months can be configured to follow billing period
  • light, minimal resource usage
  • same low cpu usage regardless of traffic
  • can be used without root permissions
  • online color configuration editor


    ss #1


If you're only interested in the amount of traffic that came in (RX) and the amount of traffic that went out (TX) you can get this a variety of ways, but the easiest is to look at the output of ifconfig.


$ ifconfig wlp3s0
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::226:c7ff:fe85:a720  prefixlen 64  scopeid 0x20<link>
        ether 00:26:c7:85:a7:20  txqueuelen 1000  (Ethernet)
        RX packets 15846640  bytes 9655221715 (8.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15902606  bytes 3655307055 (3.4 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

In the above output you'll notice the amount of bytes that my WiFi network device has received (RX) and sent (TX).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.