bandwidth monitoring

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

Upload: pedy

Post on 19-Nov-2014

182 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bandwidth Monitoring

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)

– GrafikVersion 1.0 linuxslides.blogspot.com

Page 2: Bandwidth Monitoring

Bandwidth Monitoring Tools

● bmon● bwm● bwm-ng● vnStat● vnStat with PHP frontend

Version 1.0 linuxslides.blogspot.com

Page 3: Bandwidth Monitoring

bmonbmon 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

Page 4: Bandwidth Monitoring

bmon

Page 5: Bandwidth Monitoring

bwmBandWidth 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

Page 6: Bandwidth Monitoring

bwm

Version 1.0 linuxslides.blogspot.com

Page 7: Bandwidth Monitoring

bwm-ngBandWidth 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

Page 8: Bandwidth Monitoring

bwm-ng

Version 1.0 linuxslides.blogspot.com

Page 9: Bandwidth Monitoring

vnStatvnStat 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

Page 10: Bandwidth Monitoring

VnStat with PHP FrontendBjorge 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

Page 11: Bandwidth Monitoring

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';

Configuring VnStat PHP Frontend

Version 1.0 linuxslides.blogspot.com

Page 12: Bandwidth Monitoring

Accessing VnStathttp://localhost/vnstat/

Version 1.0 linuxslides.blogspot.com