View your Traffic Quota with vnStat - Network monitoring
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:
- Post photo by Jordan Harrison on Unsplash