View Full Version : [ubuntu] ubuntu tools for monitoring bandwidth?

April 30th, 2009, 03:06 AM
I'd like some command-line tools to monitor bandwidth (to the outside world, not my LAN). Ideally something with simple output (kbps up/down) so I can graph it in Cacti.

Any suggestions? Thanks!

June 1st, 2009, 10:43 PM
What exactly are you trying to monitor the bandwidth of? From where to where?

June 2nd, 2009, 05:11 PM
I would like to monitor all in/out WAN traffic and exclude LAN traffic between computers on the LAN. I do want to monitor the other computer's WAN traffic too though. I have tried Darkstat, but am looking for something else. HTTP/Graphs would be nice, but anything that keeps a human-viewable database for a configurable amount of time will do.

June 2nd, 2009, 05:14 PM
It may supply your needs:


IF I understood what you want! :)

June 2nd, 2009, 11:16 PM
You can try using ipflow. It's simple and live.

Also, you can autograph stuff like this in Cacti by enabling SMTP on the appropriate device or box and then using the appropriate template.

June 3rd, 2009, 02:39 AM
vnstat is an excellent command line bw monitor. I use it to monitor my dedicated servers.

June 4th, 2009, 02:53 PM
i like iftop..

June 4th, 2009, 03:50 PM
depending on the setup the below might work.

iptables -N outside
iptables -A INPUT -s 0/0 -j outside
iptables -A INPUT -d 0/0 -j outside
netstat -tn |awk '$5 {print $5}' |awk -F\: '{print $1}' | sort | uniq |grep -v Add |grep -v serv|awk '{print "iptables -A outside -s "$1" ; iptables -A outside -d "$1 }' |sh

To see the traffic stats use

iptables -nvx -L outside

Here is good howto:


ntop works very well also

June 4th, 2009, 05:20 PM
You can use munin.


June 4th, 2009, 09:33 PM
++ iftop
For a quick "see who's stealing all the bandwidth" I like iftop.
If you want a more thorough look at what's going then ntop (http://www.ntop.org/).