Coder Social home page Coder Social logo

Count 8GB on PPP in 1 second about vnstat HOT 8 CLOSED

vergoh avatar vergoh commented on July 23, 2024
Count 8GB on PPP in 1 second

from vnstat.

Comments (8)

vergoh avatar vergoh commented on July 23, 2024

Hi,
which version of vnStat is being used and is the daemon or a cron entry active?

from vnstat.

Narga avatar Narga commented on July 23, 2024

I've installet vnstat v1.13 on Arch Linux and running it as systemd daemon:

[Unit]
Description=vnStat network traffic monitor
Documentation=man:vnstatd(1) man:vnstat(1) man:vnstat.conf(5)
After=network.target

[Service]
ExecStart=/usr/sbin/vnstatd -n
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target```

from vnstat.

vergoh avatar vergoh commented on July 23, 2024

Good. The version and the daemon shouldn't then be the reason for the problem. Could you run
vnstat --showconfig | egrep '^Band|^Max|Interval'
to show the relevant settings.

from vnstat.

Narga avatar Narga commented on July 23, 2024

Here is mine:

$   vnstat --showconfig | egrep '^Band|^Max|Interval'
BandwidthDetection 1
MaxBandwidth 1000
MaxBWethnone 8
UpdateInterval 30
PollInterval 5
SaveInterval 5
OfflineSaveInterval 30
BandwidthDetectionInterval 5

from vnstat.

vergoh avatar vergoh commented on July 23, 2024

Ok. The problem is essentially the combination of those (default) settings. Usually BandwidthDetection would help but it can't be done with PPP interfaces (or at least I don't know how). As a result, vnStat uses the MaxBandwidth value as fallback and that value is far to high for a 3G USB interface. Use some speedtest to determinate what the bandwidth of your connection is in a optimum situation and update the MaxBandwidth value to match that. You may also want to lower UpdateInterval to something like 10. Finally, restart the daemon in order to take new settings into use.

from vnstat.

Narga avatar Narga commented on July 23, 2024

Thanks, I've changed it in /etc/vnstat.conf, hope it work flawlessly.
One more question. How can I edit the database to fix wrong bandwidth in this month.

from vnstat.

vergoh avatar vergoh commented on July 23, 2024

Editing the database can be achieved by first exporting the database to a text file using the --exportdb parameter, then fixing the wrong information with any plain text editor (note that there are several lines to update, the format is described on the man page) and finally importing the database back using --importdb. The daemon will need to be stopped during this process.

from vnstat.

Narga avatar Narga commented on July 23, 2024

It's great, I fixed it but I suggest an example in man, --exportdb section, I got a little confusion until I found the example in --importdb section. 😃

from vnstat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.