Installing and using Vnstat and Vnstati

Vnstat is a simple traffic accounting tool.
Vnstati is a utility for visualizing statistics.

Installation in Ubuntu:

sudo apt-get install vnstat vnstati

An example of starting the traffic count of the specified network interface:

sudo vnstat -u -i eth0

Removing from the database and stopping the traffic count of the specified network interface:

vnstat -i eth0 --delete

An example of viewing statistics:

vnstat

An example of viewing statistics on the specified network interface:

vnstat -i eth0

You can check whether vnstat is running with the command:

ps -f | grep vnst

I will describe the possible startup keys:
-h (by the hour)
-d (per day)
-m (per month)
-w (per week)
-t (top10)
-s (short output)
-l (in real time)

An example of creating a picture using vnstati:

vnstati -vs -i eth0 -o ~/img.png

Leave a comment

Leave a Reply