Comments (11)
That's some strange behaviour. Few questions:
- Was 1.14 already in use when those problems started?
- Your hostname suggests that's a laptop. What sort of connectivity/usage does wlan0 have, always connected or more like random usage with disconnects?
- Is hibernate and/or suspend getting used?
- Is ntpd configured and running?
Assuming the daemon was in use and you don't have a quick log discard, it would be interesting to see what the vnstatd output was around 31.7.2015. That could contain some clues why the duplicates happen.
from vnstat.
- I used 1.11-2 from the official ubuntu repositories and upgraded to the latest version in mid July. So the duplication happened with both versions.
- wlan0 is my main network device and it usually does not have disconnects.
- Suspend mode is used frequently hibernation not at all.
- ntpd is not installed/used
Unfortunately I only have syslogs from August which is weird but not related to this.
I switched to a different time zone and back some time ago. Do you think this is related.
from vnstat.
I just noticed that I changed the system time on the 31 of July.
from vnstat.
Ok Im pretty sure the duplicated entries are caused by changing the system time. Is there a way to edit the database of vnstat?
from vnstat.
Yes, that indeed appears to be the likely case. Either bad timing with the system time change or changing to a timezone far enough from the previous. I'll have to see if I could come up with some sort of sanity checker that would merge that kind of duplicated days/months when the database is loaded.
It's possible to edit the database like this:
- use
--exportdb
and pipe the output to a file - modify the file, the format is explained in the vnstat(1) man page
- stop the daemon before import
- make a backup of the original database file
- use
--importdb
to import the modified text file - check with
vnstat
that the modifications are as intended - restart the daemon
If you don't mind, could you show the output of --exportdb
before editing it. The timestamps are likely to give some idea how the duplication happens and how it could be either prevented or merged back.
from vnstat.
Here is the exported database: https://gist.github.com/AlexMl/758a22e8f75673196683
The time change was about 7 or 8 hours if it matters.
from vnstat.
I had time to fix the database today. Thanks for your help. Everything is fine again.
One last Question:
m;0;1438380001;81047;4361;897;955;1
What are the last three numbers for? I read the manpage but did not understand it.
from vnstat.
On that line, 897 is the rx KiB value for the current month and 955 is the corresponding tx value. This structure is due to vnStat historical reasons. For getting the rx value in KiB, you'd count 81047 * 1024 + 897 and in a similar way, tx for that line is 4361 * 1024 + 955.
The last number is either 0 or 1 depending on whether that line has already been filled by vnStat and it's being shown in outputs. Usually it will show everywhere as 1 if the database has been in use for longer than 11 months.
from vnstat.
It's happening for me too on my OpenWRT router. Sometimes when there's an power outage vnstat get's all messed up and it doubles the entries like in the screenshots above.
from vnstat.
Hopefully the switch to the sqlite database will make this problem go away as I don't have a good understanding how to replicate it in order to better understand what's happening and why. At least based on sqlite's documentation, it should be better at handling partially completed writes that are likely to happen during a power outage. I suspect that's something the filesystem in OpenWRT doesn't do be itself.
from vnstat.
sqlite database implementation has been merged from the branch to master and will be included in vnStat 2.0 release.
from vnstat.
Related Issues (20)
- Traffic rate for * higher than set maximum HOT 6
- reference to vnstat-server in offical page in vnstat related section HOT 2
- vnstatd 2.9, kernel "NULL pointer dereference" HOT 3
- Is vnstati based on other charting software ? If so, which one ? HOT 1
- BUILD FAIL: configure cannot guess build type HOT 1
- Wrong date if you want to track the daily use HOT 5
- Pfsense retention HOT 1
- vnstat: no longer works after databases/sqlite3 disabled DQS HOT 2
- Database size growing at alarming rate. Best ways to curb it? HOT 18
- Vnstat virtual interface not appearing HOT 7
- New VLANs not discovered HOT 2
- 95th percentile bandwidth calculation HOT 18
- wrong stat data for some interface HOT 17
- Calculate Traffic when vnstat stopped! HOT 4
- how to recover the database when i modify the time and updae the database force HOT 2
- How to install latest version? HOT 6
- Publish to snap store HOT 7
- vnstat measures file sharing from one device to another as transmission HOT 3
- How to install vnstat 2.9+ on Debian Bookworm. HOT 4
- Wireguard interface disabled, can't enable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vnstat.