View your Traffic Quota with vnStat - Network monitoring

CentOS Nov 4, 2017

If you are running a virtual private server (like me), you probably restricted with a bandwidth quota. To view your current traffic consumption, you can install a tool called vnStat.

What is vnStat for?

Most of your installed services on your virtual private server generate  bandwidth traffic. You generally can distinguish the traffic in transmit tx and receive rx.

With vnStat, you can monitor all data by month, week, hour and day. It is also very lightweight in using system resources. So, the CPU usage is low.

How can I install this tool?

If you haven't already done, enable EPEL repositories.

yum -y install epel-release && yum -y update

Use the following command to install vnStat

yum -y install vnstat

The next step is to register this tool as a service. The OS will execute the background task on every boot.

systemctl enable vnstat && systemctl start vnstat && chkconfig vnstat on

You are now ready to use it. Here are some useful examples:

#overview since start, monthly and daily
vnstat
 
#live transfer rate
vnstat -l
 
#overview monthly
vnstat -m
 
#overview last days
vnstat -d

You are finished with the installation of vnStat.


Please comment below, if you have any questions.

Tested on:

  • vnStat: 1.15

Credits:

Tags

Stefan

Howdy! I'm Stefan and I am the main author of this blog. If you want know more, you can check out the 'About me' page.

Impressum | Data Privacy Policy | Disclaimer
Copyright: The content is copyrighted and may not be reproduced on other websites without permission.