Install VnStat Network Monitoring on CentOS 7

Install VnStat Network Monitoring on CentOS 7

The article will help you to install VnStat network monitoring on your CentOS 7 server. vnStat is a console-based network traffic monitor for Linux. This will help to monitor multiple interfaces at the same time. Several output options can be configured based on the user requirement.

In order to install VnStat, you have to enable EPEL repositories package for your version of Linux

yum -y install epel-release

Now VnStat can be installed with the following command.

yum -y install vnstat

Once the installation is completed, use the following command to start vnstat network monitoring.

systemctl start vnstat
systemctl enable vnstat
chkconfig vnstat on

Check the service status using the following command.

service vnstat status

The network can be monitored by the following commands from the command line.

vnstat --help


vnStat 1.16 by Teemu Toivola

-q, --query query database
-h, --hours show hours
-d, --days show days
-m, --months show months
-w, --weeks show weeks
-t, --top10 show top10
-s, --short use short output
-u, --update update database
-i, --iface select interface (default: eth0)
-?, --help short help
-v, --version show version
-tr, --traffic calculate traffic
-ru, --rateunit swap configured rate unit
-l, --live show transfer rate in real time

See also "--longhelp" for complete options list and "man vnstat".

Sample output of vnstat command

[root@server ]# vnstat
Database updated: Mon Jan 30 06:38:25 2017

venet0 since Monday 30 January 2017

rx: 10.23 MiB tx: 497 KiB total: 10.72 MiB

rx | tx | total | avg. rate
Jan '17 10.23 MiB | 497 KiB | 10.72 MiB | 0.03 kbit/s
estimated -- | -- | -- |

rx | tx | total | avg. rate
today 10.23 MiB | 497 KiB | 10.72 MiB | 3.67 kbit/s
estimated -- | -- | -- |
----- ----- -----

That’s it!

Also ReadInstall Htop on CentOS/RHEL and Ubuntu

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at