Vous êtes sur la page 1sur 12

Bandwidth Monitoring

● Bermanfaat untuk memantau penggunaan


bandwidth
● Pemantauan berdasarkan interface (contoh:
eth0, eth1 atau wlan0)
● Pemantauan meliputi
– Transmitted traffic (TX)
– Received traffic (RX)
● Hasil pemantauan dapat berupa:
– Angka (text)
– Grafik
Version 1.0 linuxslides.blogspot.com
Bandwidth Monitoring Tools
● bmon
● bwm
● bwm-ng
● vnStat
● vnStat with PHP frontend

Version 1.0 linuxslides.blogspot.com


bmon
bmon is a portable bandwidth monitor and rate estimator. It supports
various input methods for different architectures. Various output modes
exist, including an interactive curses interface, lightweight HTML output,
and simple ASCII output.

Install bmon on Ubuntu:

$ sudo apt-get install bmon

To launch bmon just enter bmon at the terminal.

$ bmon

You can select a specific interface to view traffic details. In the screen
shot below I selected eth0, 'g' for graphical statistics and 'd' for detailed
statistics.

Version 1.0 linuxslides.blogspot.com


bmon
bwm
BandWidth Monitor (bwm) This is a very tiny bandwidth monitor (not
X11). Can monitor up to 16 interfaces in the in the same time, and
shows totals too.

Install bwm on Ubuntu:

$ sudo apt-get install bwm

To launch bwm just enter bwm at the terminal.

$ bwm

Output looks like below

Version 1.0 linuxslides.blogspot.com


bwm

Version 1.0 linuxslides.blogspot.com


bwm-ng
BandWidth Monitor NG (bwm-ng) s a small and simple console-based
live bandwidth monitor, unlimited number of interfaces supported, output
of KB/s, Kb/s, packets, errors, average, max and total sum. Output in
curses, plain console, CSV or HTML also supported.

Install bwm-ng on Ubuntu:

$ sudo apt-get install bwm-ng

To launch bwm-ng just enter bwm-ng at the terminal.

$ bwm-ng

Output looks like below

Version 1.0 linuxslides.blogspot.com


bwm-ng

Version 1.0 linuxslides.blogspot.com


vnStat
vnStat is a network traffic monitor for Linux that keeps a log of daily
network traffic for the selected interface(s). vnStat is not real time, it
takes time to plot the data. During installation vnStat sets up a cron job
that refreshes the bandwidth consumption data on the specified
intercace every five minutes.

Install vnStat on Ubuntu:

$ sudo apt-get install vnstat

To launch vnStat and initialize the database:

$ vnstat -u -i eth0

It will create a database stored in a file in the /var/lib/vnstat/ directory in


a small binary file.

Wait couple of minutes, then check the result:

$ vnstat Version 1.0 linuxslides.blogspot.com


VnStat with PHP Frontend
Bjorge Dijkstra’s PHP-based Web front end for vnStat takes the data
collected by the command-line vnStat and displays it in tables and
graphically in your browser. The front end requires a Web server
configured with PHP.

Download vnstat_php_frontend-1.X.X.tar.gz from here:


www.sqweek.com/sqweek/index.php?p=1

Create and extract to the vnstat directory under DocumentRoot:

$ sudo mkdir /var/www/vnstat


$ sudo sudo tar -zxvf
/[Your_Download_Location]/vnstat_php_frontend-1.2.1.tar.gz
-C /var/www/vnstat/

Version 1.0 linuxslides.blogspot.com


Configuring VnStat PHP Frontend

Configure vnstat PHP frontend:

$ sudo vim /var/www/vnstat/config.php

// edit these to reflect your particular situation


$locale = 'en_US.UTF-8';
$language = 'en';

// list of network interfaces monitored by vnStat


$iface_list = array('eth0', 'sixxs');

//
// optional names for interfaces
// if there's no name set for an interface then the
// interface identifier
// will be displayed instead
//
$iface_title['eth0'] = 'Internal';
$iface_title['sixxs'] = 'SixXS IPv6';
Version 1.0 linuxslides.blogspot.com
Accessing VnStat
http://localhost/vnstat/

Version 1.0 linuxslides.blogspot.com

Vous aimerez peut-être aussi