Difference between revisions of "VnStat After Install Script"

From Amahi Wiki
Jump to: navigation, search
(New page: <h1>This page will show you what commands you need to run after one-click install of vnStat</h1> First, open up terminal and login as root: <code>su - root</code> <i>At this time the com...)
 
Line 3: Line 3:
 
First, open up terminal and login as root:
 
First, open up terminal and login as root:
  
<code>su - root</code>
+
<code>su - root</code></br>
 
<i>At this time the commands have to be run in root. Sorry for any inconvinence</i>
 
<i>At this time the commands have to be run in root. Sorry for any inconvinence</i>
  
Line 10: Line 10:
 
<strong>Creates the /var/lib/vnstat/eth0 file with root:root:</strong>
 
<strong>Creates the /var/lib/vnstat/eth0 file with root:root:</strong>
  
<code>vnstat -i eth0 -u
+
<code>vnstat -i eth0 -u</code>
chown vnstat:vnstat /var/lib/vnstat/*eth0</code>
+
<code>chown vnstat:vnstat /var/lib/vnstat/*eth0</code>
  
 
<strong>Creates the /var/lib/vnstat/.eth0 file:</strong>
 
<strong>Creates the /var/lib/vnstat/.eth0 file:</strong>
  
<code>vnstat -i eth0 -u
+
<code>vnstat -i eth0 -u</code>
chown vnstat:vnstat /var/lib/vnstat/*eth0</code>
+
<code>chown vnstat:vnstat /var/lib/vnstat/*eth0</code>
  
 
<strong>Enables updates every minute:</strong>
 
<strong>Enables updates every minute:</strong>

Revision as of 23:23, 23 May 2009

This page will show you what commands you need to run after one-click install of vnStat

First, open up terminal and login as root:

su - root
At this time the commands have to be run in root. Sorry for any inconvinence

After you have done that, do the following commands in order:

Creates the /var/lib/vnstat/eth0 file with root:root:

vnstat -i eth0 -u chown vnstat:vnstat /var/lib/vnstat/*eth0

Creates the /var/lib/vnstat/.eth0 file:

vnstat -i eth0 -u chown vnstat:vnstat /var/lib/vnstat/*eth0

Enables updates every minute:

sed -i -e 's/# \*\/5/\*/' /etc/cron.d/vnstat

Now go to http://vnstat and view all of your bandwidth stats.