CentOS / RHEL: Install vnStat Network Traffic Monitor To Keep a Log Of Daily Traffic

www.lau‮c.irutt‬om
CentOS / RHEL: Install vnStat Network Traffic Monitor To Keep a Log Of Daily Traffic

To install the vnStat network traffic monitor on CentOS or RHEL, you can use the following steps:

  1. Install the vnStat package using the yum or dnf package manager:
sudo yum install vnstat

or

sudo dnf install vnstat

This will install the vnStat package and all of the required dependencies.

  1. Once the installation is complete, you can start the vnStat daemon by running the following command:
sudo systemctl start vnstat
  1. To ensure that vnStat starts automatically when the system boots, you can enable the vnStat service by running the following command:
sudo systemctl enable vnstat
  1. To view the current traffic statistics for a network interface, you can use the vnstat command with the -i option and the name of the interface. For example:
vnstat -i eth0

This will display the current traffic statistics for the eth0 interface.

  1. To view a summary of daily traffic statistics, you can use the vnstat command with the -d option and the name of the interface. For example:
vnstat -d eth0

This will display a summary of daily traffic statistics for the eth0 interface.

  1. To view a summary of hourly traffic statistics, you can use the vnstat command with the -h option and the name of the interface. For example:
vnstat -h eth0

This will display a summary of hourly traffic statistics for the eth0 interface.

You can use the vnStat command with different options to view various types of traffic statistics.

Created Time:2017-10-16 14:38:41  Author:lautturi