AvoidErrors
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM
No Result
View All Result
AvoidErrors
No Result
View All Result

How to install vnStat on Ubuntu Linux Server

Miguel by Miguel
May 16, 2017 - Updated on September 14, 2017
in Linux
0
Share on FacebookShare on Reddit
RECOMMENDED: Transfer Windows and Installed Data to Another Hard Drive

vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s).

It uses the network interface statistics provided by the kernel as an information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources.

Following this tutorial will guide you how you can install vnStat but before we proceed to our installation process make sure that you had installed LAMP stack.

1. Update all packages on your system by the below command.

sudo apt-get update

2. Use the below command to install “vnStat” package on your system.

sudo apt-get install vnstat

3. Once the installation is done, restart “vnStat” service and enable it, by the 2 below commands.

sudo systemctl start vnstat

sudo systemctl enable vnstat

4. You can use the below commands to show the statistics of your bandwidth by “vnState” on “Terminal”.

– To show statistics for day “vnstat -d”

– To show statistics for 1 month “vnstat -m”

– To show statistics for an hour “vnstat-h”

– To show statistics for the current real-time “vnstat -l”

Configure vnStat PHP web based interface

vnStat also provides PHP based web interface to show graphical statistics. In order to set up vnStat web interface, it required install LAMP stack on Ubuntu 16.04, you can simply install LAMP.

1. Download “vnStat” PHP code by the using the command below on Terminal.

sudo wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz

2. Extract the downloaded archive in web accessible directory, you can do that by the command below.

tar xzf vnstat_php_frontend-1.5.1.tar.gz
mv vnstat_php_frontend-1.5.1 /var/www/html/

3. Open and Edit the file “config.php” to be like below.

4. Open your web browser and enter your local IP address to open “vnStat” web interface.

Congratulations! You have successfully installed and configured “vnStat”. Thanks for using our guide for installing VnStat network monitoring tool on.

Previous Post

How To Install a MEAN.JS Stack on an Ubuntu 16.04 Server?

Next Post

How to Upgrade to Ubuntu 17.04 from an Earlier Version

Miguel

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

Related Posts

Install ownCloud on Ubuntu 20.04 LTS DigitalOcean
Linux

Install ownCloud on Ubuntu 20.04 LTS DigitalOcean

by Miguel
June 21, 2022 - Updated on June 22, 2022
Completely Remove Windows 11 and Install Ubuntu
Linux

Completely Remove Windows 11 and Install Ubuntu

by Miguel
April 8, 2022

Subscribe to get weekly tutorials direct to your inbox!

Windows

Fix .net Framework 3.5 Missing on Windows 11

by Rhousse
August 13, 2022
Clean Install Windows 11 Without USB
Windows

How to turn off Delivery Optimization on Windows 11

by Muhammad Imran Habib
August 13, 2022
How to Enable Dark Mode on Windows 11
Windows

How to Prevent Users from Changing Proxy Settings in Windows 11

by Muhammad Imran Habib
August 13, 2022
How to Check Laptop Battery Details in Windows 10
Windows

How to Create a New Custom Power Plan in Windows 11

by Muhammad Imran Habib
August 13, 2022
  • Disclaimer & Privacy Policy
  • FAQ
© 2022 Powered by Cloudways
No Result
View All Result
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM

© 2022 AvoidErrors Powered by Cloudways | Privacy

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.