• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install Vnstat in CentOS

{{postValue.id}}

To Install Vnstat in CentOS

Vnstat is a network traffic monitor tool used for Linux based systems. It allows the users to maintain a log of network traffic for the selected interfaces. In this Vnstat tool, the interface bandwidth will reduce automatically. This article explains installation process of the Vnstat in CentOS.

Features

  • Multiple output options
  • Generate png graphic output
  • Consumes lite portion of system resources
  • Monitor multiple network interfaces at same time
  • Sort the data by month, week, hour and day
  • Low CPU usage

Installation of Vnstat

First install epel package with the following command.

[root@linuxhelp Desktop]# yum -y install epel-release
Loaded plugins: fastestmirror, langpacks
base                                                     | 3.6 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Loading mirror speeds from cached hostfile
 * base: mirrors.vinahost.vn
 * extras: mirrors.vinahost.vn
 * updates: mirrors.vinahost.vn
.
.
.
Running transaction
  Installing : epel-release-7-6.noarch                                      1/1 
  Verifying  : epel-release-7-6.noarch                                      1/1 
Installed:
  epel-release.noarch 0:7-6                                                     
Complete!

Now its time to install Vnstat package.

[root@linuxhelp Desktop]# yum -y install vnstat
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink                                     | 4.6 kB     00:00     
epel                                                     | 4.3 kB     00:00  
.
.
.
Running transaction
  Installing : vnstat-1.15-2.el7.x86_64                                     1/1 
  Verifying  : vnstat-1.15-2.el7.x86_64                                     1/1 
Installed:
  vnstat.x86_64 0:1.15-2.el7                                                    
Complete!


Start and enable the Vnstat service.

[root@linuxhelp Desktop]# systemctl start vnstat
[root@linuxhelp Desktop]# systemctl enable vnstat

Also start Vnstat at run-level.

[root@linuxhelp Desktop]# chkconfig vnstat on

Commands Usage

Run the vnstat command without any option to view the network bandwidth details.

[root@linuxhelp Desktop]# vnstat

network bandwidth

The ' d' option is used to view the daily report of network usage statics.

[root@linuxhelp Desktop]# vnstat -d

statics

The ' h' option helps you to view the hour report of network usage statics.

[root@linuxhelp Desktop]# vnstat -h


hour report

The ' w' option used to view the weekly report of network usage statics.

[root@linuxhelp Desktop]# vnstat -w


weekly report

The ' m' option views the monthly report of network usage statics.

[root@linuxhelp Desktop]# vnstat -m


monthly report

The ' s' option helps you to view the network statics report at short.

[root@linuxhelp Desktop]# vnstat -s


network statics

The ' t' option views the top 10 network log reports.

[root@linuxhelp Desktop]# vnstat -t


log reports

The ' iflist' command used to view the network interface details.

[root@linuxhelp Desktop]# vnstat --iflist
Available interfaces: eno16777736 (1000 Mbit) lo

The ' u' option used to update the Vnstat.

[root@linuxhelp Desktop]# vnstat -u

The ' v' used to check the version of vnstat.

[root@linuxhelp Desktop]# vnstat -v
vnStat 1.15 by Teemu Toivola 


To know more information about vnstat use following option.

[root@linuxhelp Desktop]# vnstat --help

Use the following command to convert the network bandwidth report in image format.

[root@linuxhelp Desktop]# vnstati -s -i eno16777736 -o /root/Desktop/report.png
[root@linuxhelp Desktop]# display report.png


network bandwidth

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

is there any alternative to Vnstat?

A

Try the followings which are alternative for Vnstat, Munin
ntop
nload

Q

What is this KiB/MiB/GiB/TiB thing?

A

See http://en.wikipedia.org/wiki/Binary_prefix#Prefixes and UnitMode option in the configuration file.

Q

What does the 'estimated' value mean?

A

The estimated value is an calculated average that tries to predict the total traffic for the current day/month based on previous traffic.

Q

Does vnStat work for PPPoE users?

A

Yes. PPPoE is basically like a dialup connection and it can be monitored in the same way as any ppp interface. However, with PPPoE it's usually also possible to bring up the LAN interfa

Q

What type of output is attained from VNstat?

A

vnstat generates png graphics output.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.