bandwidth monitoring
TRANSCRIPT
![Page 1: Bandwidth Monitoring](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/1.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/2.jpg)
Bandwidth Monitoring Tools
● bmon● bwm● bwm-ng● vnStat● vnStat with PHP frontend
Version 1.0 linuxslides.blogspot.com
![Page 3: Bandwidth Monitoring](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/4.jpg)
bmon
![Page 5: Bandwidth Monitoring](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/6.jpg)
bwm
Version 1.0 linuxslides.blogspot.com
![Page 7: Bandwidth Monitoring](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/8.jpg)
bwm-ng
Version 1.0 linuxslides.blogspot.com
![Page 9: Bandwidth Monitoring](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/10.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022081804/546bb4b4b4af9f5a098b45c0/html5/thumbnails/12.jpg)
Accessing VnStathttp://localhost/vnstat/
Version 1.0 linuxslides.blogspot.com