<?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>OpenSource NetMonitoring &#187; non-root</title>
	<atom:link href="http://www.netmonitoring.org/tag/non-root/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netmonitoring.org</link>
	<description>Install,configure,troubleshoot opensource monitoring with tips and tricks</description>
	<lastBuildDate>Sat, 06 Nov 2010 14:54:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Install and run vnStat as a Non-Root user</title>
		<link>http://www.netmonitoring.org/vnstat-bandwidth-monitoring/install-and-run-vnstat-as-a-non-root-user/</link>
		<comments>http://www.netmonitoring.org/vnstat-bandwidth-monitoring/install-and-run-vnstat-as-a-non-root-user/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 22:26:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vnStat Bandwidth Monitoring]]></category>
		<category><![CDATA[Bandwidth-Monitoring]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network-monitoring]]></category>
		<category><![CDATA[non-root]]></category>
		<category><![CDATA[vnStat]]></category>

		<guid isPermaLink="false">http://www.netmonitoring.org/vnstat-bandwidth-monitoring/install-and-run-vnstat-as-a-non-root-user/</guid>
		<description><![CDATA[One of the advantages of vnStat is that it can be installed and run as a Non-Root user. This can be of a great help to query vnStat of scripts or allow operators to run the vnStat utility. Download vnStat Download vnStat from here DebianSystem# wget http://humdi.net/vnstat/vnstat-1.6.tar.gz Unzip &#38; Untar the downloaded the file DebianSystem# <a href='http://www.netmonitoring.org/vnstat-bandwidth-monitoring/install-and-run-vnstat-as-a-non-root-user/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><div style="float: left"; margin-right: 5px;>
<script type="text/javascript"><!--
google_ad_client = "pub-6220434432369569";
/* netmon_336x280_post */
google_ad_slot = "8374956079";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div><br />
One of the advantages of vnStat is that it can be installed and run as a Non-Root user. This can be of a great help to query vnStat of scripts or allow operators to run the vnStat utility.</p>
<p><span id="more-42"></span><u><strong>Download vnStat<br />
</strong></u><br />
Download vnStat from <a href="http://humdi.net/vnstat/vnstat-1.6.tar.gz" title="vnStat Network Traffic Monitor" target="_blank">here</a></p>
<blockquote><p><strong>DebianSystem# wget http://humdi.net/vnstat/vnstat-1.6.tar.gz</strong></p></blockquote>
<p><u><strong>Unzip &amp; Untar the downloaded the file</strong></u></p>
<blockquote><p><strong>DebianSystem# tar -zxvf vnstat-1.6.tar.gz</strong></p></blockquote>
<p><u><strong>ChangeDirectory &amp; Compile</strong></u></p>
<blockquote><p><strong>DebianSystem# cd vnstat-1.6</strong></p>
<p><strong>DebianSystem:/vnstat-1.6# make</strong></p></blockquote>
<p><u><strong>Create Database Directory</strong></u></p>
<p>If there was no errors, copy src/vnstat to some directory included in $PATH variable(say ~/bin/) and create the database directory.</p>
<blockquote><p><strong>DebianSystem# cp src/vnstat ~/bin/</strong><br />
<strong>DebianSystem# cp cfg/vnstat.conf ~/.vnstatrc</strong><br />
<strong>DebianSystem# mkdir ~/.vnstat</strong></p></blockquote>
<p><u><strong>Test Kernel compatibility</strong></u></p>
<blockquote><p><strong>DebianSystem# vnstat &#8211;testkernel</strong></p></blockquote>
<p><u><strong>Edit Config file &amp; Add Database Directory<br />
</strong></u></p>
<blockquote><p><strong>DebianSystem# vi ~/.vnstatrc</strong></p></blockquote>
<p>Locate</p>
<p><em><strong>DatabaseDir &#8220;/var/lib/vnstat&#8221;<br />
</strong></em><br />
and replace with</p>
<p><em><strong>DatabaseDir &#8220;/pathtoyourhomedir/.vnstat&#8221;<br />
</strong></em><br />
and save the file.</p>
<p>Next every interface that should be monitored needs to be added to vnStat. This creates a database for each of the interface.</p>
<blockquote><p><strong>DebianSystem# vnstat -u -i eth0</strong></p></blockquote>
<p>where eth0 is the interface name. Change it to the interface on your system.</p>
<p><u><strong>CRON Job</strong></u><br />
Add a crontab job entry for vnStat.</p>
<blockquote><p><strong>DebianSystem# crontab -e</strong></p></blockquote>
<p>and add the following line</p>
<blockquote><p><strong>*/5 * * * * ~/bin/vnstat -u</strong></p></blockquote>
<p>Allow it to collect enough traffic information after which run vnstat</p>
<blockquote><p><strong>DebianSystem# vnstat</strong></p></blockquote>
<p>Also, in any case you can check the config file <strong>~/.vnstatrc</strong> for interface and other settings.</p>
<p>For more options and examples for the command, <a href="http://www.netmonitoring.org/vnstat-bandwidth-monitoring/vnstat-network-trafficbandwidth-monitoring-for-linux/" title="vnStat Network Traffic Monitor" target="_blank">click here</a></p>
<h3>Related Post</h3><ul class="related_post"><li><a href="http://www.netmonitoring.org/vnstat-bandwidth-monitoring/vnstat-php-frontend-install-config-webinterface-for-vnstat/" title="vnStat PHP Frontend &#8211; Install &#038; Config Webinterface for vnStat">vnStat PHP Frontend &#8211; Install &#038; Config Webinterface for vnStat</a></li><li><a href="http://www.netmonitoring.org/vnstat-bandwidth-monitoring/vnstat-network-trafficbandwidth-monitoring-for-linux/" title="vnStat Network traffic/Bandwidth Monitoring for Linux">vnStat Network traffic/Bandwidth Monitoring for Linux</a></li><li><a href="http://www.netmonitoring.org/darkstat-bandwidth-monitoring/darkstat-network-bandwidthtraffic-monitoring-for-linux-nix/" title="DarkStat &#8211; Network Bandwidth/Traffic monitoring for Linux *NIX">DarkStat &#8211; Network Bandwidth/Traffic monitoring for Linux *NIX</a></li><li><a href="http://www.netmonitoring.org/centreon/install-configure-centreon-network-monitoring-in-debian/" title="Install &#038; Configure Centreon Network Monitoring in Debian">Install &#038; Configure Centreon Network Monitoring in Debian</a></li><li><a href="http://www.netmonitoring.org/centreon/configure-centreon-setup-and-database/" title="Configure Centreon setup and database">Configure Centreon setup and database</a></li><li><a href="http://www.netmonitoring.org/centreon/install-centreon-network-monitoring-binaries-in-debian/" title="Install Centreon Network Monitoring binaries in Debian">Install Centreon Network Monitoring binaries in Debian</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.netmonitoring.org/vnstat-bandwidth-monitoring/install-and-run-vnstat-as-a-non-root-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

