LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2006, 12:29 PM   #1
PlymWS
Member
 
Registered: Aug 2006
Posts: 51

Rep: Reputation: 16
VNSTAT doesn't reset


I am using Vnstat to monitor my monthly used bandwidth as my server has a useage cap in place. At the end of the month Vnstat didn't reset its totals. I tried the command
Code:
vnstat -u -r -i eth0
but that made the totals display a huge number and didn't reset the counters to zero.

How would I reset the total counter ?
 
Old 10-23-2006, 05:44 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
How would I reset the total counter?
By deleting the /var/lib/vnstat/devicename file or by logrotating (nocreate, just --enable) the file out of /var/lib/vnstat/?
 
Old 10-25-2006, 06:17 AM   #3
PlymWS
Member
 
Registered: Aug 2006
Posts: 51

Original Poster
Rep: Reputation: 16
I deleted the file /var/lib/vnstat/eth0 but all that happened was a new database was made with the smae stats as when it was deleted

I want to use this to monitor the total bandwidth through the computers only ethernet port and hence monitor total bandwidth used by the server. As the server has a monthly bandwidth cap I want the program to reset on the first of every month. Vnstat did a good job for 1 month but now it won't reset I have no way of knowing the monthly bandwidth use.

I have read that I could setup a rule in IP tables to monitor the total bandwidth used. Any ideas how I could achieve this ? I have looked at other programs but they all give to much info for what I want to achieve. Simply, all I want is the total traffic stat. Im not worried about incoming, outgoing or transfer speeds. I just need the total.
 
Old 10-26-2006, 05:55 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I deleted the file /var/lib/vnstat/eth0 but all that happened was a new database was made with the smae stats as when it was deleted
Then you've done something wrong. I tested it here and it definately works as advertised.


I have read that I could setup a rule in IP tables to monitor the total bandwidth used. Any ideas how I could achieve this ?
Add a rule without a target (-j) at the start of the chain you want to measure. Note "iptables -L -v -n" will not give precise measurements and the counters get reset on firewall reload unless otherwise configured.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNSTAT question PlymWS Linux - Networking 3 09-12-2006 03:54 AM
Password reset hongman Linux - Newbie 2 07-11-2005 05:46 AM
How do I reset AlsaModularSynth FlyingSolo Linux - Software 0 03-31-2005 08:20 PM
strange vnstat statistic! need help! overlord73 Linux - Software 0 03-23-2005 02:58 PM
how do i reset my ip? i_is_cat Linux - Newbie 8 07-31-2003 03:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration