2

Is there a networking statistics app or indicator for Ubuntu that can measure how much I download/upload every day/week/month and so forth?

I'm also looking for something similar that can limit my bandwidth usage, kind of like this question, but it would be better if it could limit the bandwidth for certain programs. Is this possible?

The best solution would combine both of these two functions.

I think I found something a few years ago that could limit my bandwidth (globally) after downloading a certain amount of data, but I don't remember the name.

Update: the program I used a couple of years ago was ntm. This can show stats for a single interface and disconnect if it reaches a certain data or time limit.

carestad
  • 993

1 Answers1

3

Traffic shaping on Linux system used to require knowledge of lot of things like iptables, qdiscs & networking protocols. Things have changed and now there are couple of tools which handle all of this complexity without requiring much knowledge. And one of them is wondershaper.

First install wondershaper by issuing following command.

sudo apt-get -y install wondershaper

Use following command template to make it work right away.

sudo wondershaper <interface name> <down speed> <up speed>

Where interface name is your network interface name like eth0 or eth1 or wifi0 and down speed , up speed are self explanatory and specified in kilo bits per second.

So sample command will look like

sudo wondershaper eth0 512 512

To disable wondershaper from controlling particular interface use following command.

sudo wondershaper clear <interface name>

To make these changes permanent add following lines to /etc/network/interfaces under relevant interface section.

up /sbin/wondershaper <interface name> <downspeed> <upspeed>

down /sbin/wondershaper clear <interface name>

Thats it.

Install Darkstat in Ubuntu to analyze network traffic.

swapyonubuntu
  • 992
  • 7
  • 6
  • This is still useful in 2022 to cap bandwidth system-wide (one of my applications was using unlimited upload / download speed, resulting in some sort of local denial of service) – GrafiCode Feb 17 '22 at 18:04