About :- vnStat is a network utility for the Linux operating system

Step1. Install the epel repositories

yum -y install epel-release

Step2. Install the VnStat

yum -y install vnstat

Note: If you need to change the interfaces, you will need to edit configuration files. Change the occurrences of eth0 to eth1 (or your choice of the interface).
vi /etc/vnstat.conf
Note: Next, we need to create a database where the data will be collected and stored.
vnstat -u -i eth0

Step3. Change ownership

chown vnstat:vnstat /var/lib/vnstat/eth0

Step4. Restart the service

systemctl restart vnstat

Step5. Now, use the following command


Step6. To see daily stats

vnstat -d

Step7. To see monthly network stats

vnstat -m

Step8. To see weekly network stats

vnstat -w

Step9. To see hourly network stats

vnstat -h

Step10. To see top 10 network

vnstat -t

Step11. To see the transfer rate in real-time

vnstat -l


Please enter your comment!
Please enter your name here