<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to install vnstat Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/how-to-install-vnstat/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 14 Dec 2020 21:33:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>How To Install vnStat Network Traffic Monitoring Tool On Ubuntu 20.04</title>
		<link>https://www.osradar.com/how-to-install-vnstat-network-traffic-monitoring-tool-on-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/how-to-install-vnstat-network-traffic-monitoring-tool-on-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Fri, 18 Dec 2020 06:33:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to install vnstat]]></category>
		<category><![CDATA[how to install vnstat on ubuntu 20.04]]></category>
		<category><![CDATA[how to tutorials]]></category>
		<category><![CDATA[ubuntu 20.04]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=26450</guid>

					<description><![CDATA[<p>In this tutorail you&#8217;ll learn that how to install vnStat network monitoring tool on Ubuntu 20.04. vnStat is an open source tool that can be used to monitor the network resources of your system by using console. It allows you to customize the time for generating network traffic data. vnStat provides high service with low [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-vnstat-network-traffic-monitoring-tool-on-ubuntu-20-04/">How To Install vnStat Network Traffic Monitoring Tool On Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this tutorail you&#8217;ll learn that how to install vnStat network monitoring tool on Ubuntu 20.04. vnStat is an open source tool that can be used to monitor the network resources of your system by using console. It allows you to customize the time for generating network traffic data. vnStat provides high service with low consumption of resources. So, here we&#8217;ll see the steps to instlal it on your system.</p>



<h2>Step 1: Update Your System</h2>



<p>First of all update your system to have the latest updates installed.</p>



<pre class="wp-block-preformatted">sudo apt update &amp;&amp; sudo apt upgrade -y</pre>



<p>Then reboot your system.</p>



<pre class="wp-block-preformatted">sudo reboot</pre>



<h3>Step 2: Install vnStat On Ubuntu 20.04</h3>



<p>As the latest version of vnStat is not available on the Ubuntu repositories, so we&#8217;ll install it from the source code. Hit the below command to resolve the required dependencies.</p>



<pre class="wp-block-preformatted">sudo apt install build-essential gcc make libsqlite3-dev -y</pre>



<p>After installing the above packages, get the latest version of vnStat using wget.</p>



<pre class="wp-block-preformatted">wget https://humdi.net/vnstat/vnstat-2.6.tar.gz</pre>



<p>Then extract the downloaded file by typing</p>



<pre class="wp-block-preformatted">tar -xvzf vnstat-2.6.tar.gz</pre>



<p>Now, switch to the resultant directory &amp; configure it by typing</p>



<pre class="wp-block-preformatted">cd vnstat-2.6<br>./configure --prefix=/usr --sysconfdir=/etc</pre>



<p>Finally hit the below command to instlal the vnStat on your system</p>



<pre class="wp-block-preformatted">sudo make
sudo make install</pre>



<p>After the successfull installation, verify the installed version of vnStat by typing</p>



<pre class="wp-block-preformatted">vnstat -v</pre>



<p>Output: You&#8217;ll see the similar output.</p>



<pre class="wp-block-preformatted">sabi@Ubuntu20:~/vnstat-2.6$ vnstat -v
vnStat 2.6 by Teemu Toivola</pre>



<h3>Step 3: Managing vnStat Service on Ubuntu 20.04</h3>



<p>In order to add a systemd service for vnStat, simply copy the file from vnStat source to the<strong> /etc/systemd/system/ </strong>folder by typing</p>



<pre class="wp-block-preformatted">sudo cp -v vnstat-2.6/examples/systemd/vnstat.service /etc/systemd/system/</pre>



<p>Run the given commands to start &amp; enable the vnStat services.</p>



<pre class="wp-block-preformatted">systemctl enable vnstat<br>systemctl start vnstat</pre>



<p>Make sure that vnStat is in working status by</p>



<pre class="wp-block-preformatted">sabi@Ubuntu20:~$ <strong>sudo systemctl status vnstat</strong>
● vnstat.service - vnStat network traffic monitor
Loaded: loaded (/etc/systemd/system/vnstat.service; disabled; vendor preset:&gt;
Active: active (running) since Sat 2020-12-05 11:17:42 PKT; 5s ago
Docs: man:vnstatd(8)
man:vnstat(1)
man:vnstat.conf(5)
Main PID: 17791 (vnstatd)
Tasks: 1 (limit: 2285)
Memory: 1.4M
CGroup: /system.slice/vnstat.service
└─17791 /usr/sbin/vnstatd -n
دسمبر 05 11:17:42 Ubuntu20 systemd[1]: Started vnStat network traffic monitor.
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: No interfaces found in database, addin&gt;
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: Interface "ens33" added with 1000 Mbit&gt;
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: -&gt; 1 new interface found.
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: Limits can be modified using the confi&gt;
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: Unwanted interfaces can be removed fro&gt;
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: Info: vnStat daemon 2.6 started. (pid:&gt;
دسمبر 05 11:17:42 Ubuntu20 vnstatd[17791]: Info: Monitoring (1): ens33 (1000 Mbit)
lines 1-20/20 (END)</pre>



<h3>Step 4: Working with vnStat on Ubuntu 20.04</h3>



<p>The most useful command for operating with vnStat is help command. You can see all the other options by typing this command.</p>



<pre class="wp-block-preformatted">vnstat --help</pre>



<p>Output:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="676" height="415" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/12/image-21.png" alt="" class="wp-image-26453" srcset="https://www.osradar.com/wp-content/uploads/2020/12/image-21.png 676w, https://www.osradar.com/wp-content/uploads/2020/12/image-21-300x184.png 300w" sizes="(max-width: 676px) 100vw, 676px" /></figure>



<p>You&#8217;ve to wait for few minutes to use the vnstat because vnstat take some time to update the database. Once updated, you can use it easily by typing</p>



<pre class="wp-block-preformatted">vnstat</pre>



<p>Output:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="811" height="368" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/12/image-22.png" alt="" class="wp-image-26454" srcset="https://www.osradar.com/wp-content/uploads/2020/12/image-22.png 811w, https://www.osradar.com/wp-content/uploads/2020/12/image-22-300x136.png 300w, https://www.osradar.com/wp-content/uploads/2020/12/image-22-768x348.png 768w, https://www.osradar.com/wp-content/uploads/2020/12/image-22-696x316.png 696w" sizes="(max-width: 811px) 100vw, 811px" /></figure>



<p>In order to specify the network interface type</p>



<pre class="wp-block-preformatted">vnstat -i ens3</pre>



<p>Output:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="743" height="372" src="//1081754738.rsc.cdn77.org/wp-content/uploads/2020/12/2020-12-05_11h26_51.png" alt="" class="wp-image-26455" srcset="https://www.osradar.com/wp-content/uploads/2020/12/2020-12-05_11h26_51.png 743w, https://www.osradar.com/wp-content/uploads/2020/12/2020-12-05_11h26_51-300x150.png 300w, https://www.osradar.com/wp-content/uploads/2020/12/2020-12-05_11h26_51-696x348.png 696w" sizes="(max-width: 743px) 100vw, 743px" /></figure>



<p>In order to recieve hourly stats hit</p>



<pre class="wp-block-preformatted">vnstat -h</pre>



<p>To get daily updates type</p>



<pre class="wp-block-preformatted">vnstat -d</pre>



<p>In order to see the top traffic days hit</p>



<pre class="wp-block-preformatted">vnstat -t</pre>



<p>To see the network traffic in real time type</p>



<pre class="wp-block-preformatted">vnstat -i</pre>



<p>In order to clear the database &amp; stop monitoring the interface type</p>



<pre class="wp-block-preformatted">sudo vnstat -i ens3 --remove --force</pre>



<p>Output:</p>



<pre class="wp-block-preformatted">sabi@Ubuntu20:~$ <strong>sudo vnstat -i ens33 --remove --force</strong>
Interface "ens33" removed from database.
The interface will no longer be monitored. Use --add
if monitoring the interface is again needed.</pre>



<p>To add the removed int again type</p>



<pre class="wp-block-preformatted">sudo vnstat -i ens3 --add</pre>



<p>So, this is how you can install vnStat network monitoring tool on Ubuntu 20.04</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-vnstat-network-traffic-monitoring-tool-on-ubuntu-20-04/">How To Install vnStat Network Traffic Monitoring Tool On Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-vnstat-network-traffic-monitoring-tool-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
