GIT – vnstat – vnStat is a console-based network traffic . It keeps a log of hourly, daily and monthly network traffic for the selected interface(s).

Step # 1: vnstat

Debian / user can install vnstat using apt-get command, enter:

# apt-get install vnstat

Step # 2: Enable vnstat

Once installed, you need to create a database with the following command:

# vnstat -u -i eth0


  • -u :forces a database update for interface or creates the database if it doesn’t exist
  • -i eth0 : use to specify interface

Please note that it will start to collect data via cronjob:

0-55/5 * * * *       /usr/bin/vnstat -u

You do not have to install cronjob yourself; it should be automatically configure by apt-get.

Step # 3 View statistics

Display default traffic statistics

$ vnstat

Display daily traffic statistics

$ vnstat -d

Display monthly traffic statistics:

$ vnstat -m

Display all time top10 traffic days:

$ vnstat -t

Try help option to get all query options:

$ vnstat --help

Read man page of vnstat for complete options and more information and vnstat here

Print Friendly, PDF & Email



Bài viết liên quan