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.


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..



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.


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.


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.


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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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