Skip to main content

VNSTAT ON CENTOS 7

For installing vnstat we want to enable epel-release first.
#yum install epel-release -y
#yum update

Now install vnstat package
#yum install vnstat -y

Consider enps08 is our interface.Vnstat defaultly detects on eth0 interface.So we want to enable it in configuration file.
#vi /etc/vnstat.conf
Interface enps08





#service vnstat start
Then add the enp0s8 interface to database
#vnstat -i enp0s8 
Now change the permission of database file /var/lib/vnstat/enp0s8
#chmod 777 /var/lib/vnstat/enp0s8
Now restart vnstat service
#service vnstat restart
#vnstat -d





This will give report of the day regarding transmitted data received data and total data