Bandwidth consumption statistics using vnstat

In some cases (for example,. mobile Internet, where you pay for the transfer of), good to have control over the amount of data sent and downloaded. May be helpful for programs that use statistics to create links.

Among these, mention may be m.in. vnStat, darkstat lub ntop. Personally I liked the first one - simple to configure, designed without unnecessary complications, easily be used to present data in a chosen manner, data shows almost on a regular basis (a maximum delay of a few minutes).

Installation and Configuration

First of all, you will need a package:

vnstat

Additionally - if we are interested in statistics in graphic form - you can later install package:

vnstati

Below you how to install the Centosa7
Repozytorum charge EPEL and upgrading the system:

yum -y install epel-release
yum -y update

Then install the package:

yum -y install vnstat

Run it on your system:

systemctl start vnstat
systemctl enable vnstat
chkconfig vnstat on

Below a few shortcut commands:

### daily Stats ###

vnstat -d 

### monthly statistics ###

vnstat -m

### live Stats ###

vnstat --live

### Help ###

vnstat --help

Install additional video overlay:

charge

wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz

Unpack the directory and move to: /var / www / html /:

tar xzf vnstat_php_frontend-1.5.1.tar.gz
mv vnstat_php_frontend-1.5.1 /var/www/html/

Edit config.php file:

$language = 'en';
$iface_list = array('eth0', 'sixxs');
$iface_title['eth0'] = 'Public Interface';
$vnstat_bin = '/usr/bin/vnstat';

Linux

Udostępnij
Opublikowane przez
Linux
Tagi: CentosVnstat

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu