Coder Social home page Coder Social logo

--json and -tr about vnstat HOT 3 CLOSED

vergoh avatar vergoh commented on July 23, 2024
--json and -tr

from vnstat.

Comments (3)

vergoh avatar vergoh commented on July 23, 2024

For only -tr, that shouldn't be hard too implement. Most likely the JSON output would need to contain a little bit more information (begin and end dates, duration etc.) than the current textual output in order to support more diverse uses.

This appears to be at least partially a duplicate of issue #25.

from vnstat.

ethernetweb avatar ethernetweb commented on July 23, 2024

Hah, my fault - I overlooked that somehow. I did look at the other issues but that one appears to have escaped me. Thank you again and my apologies for the dupe.

As I've noticed the -tr requires a minimum of a 2 second duration to check (that's what my config option is now). Currently, I'm just using regexp to parse the output as a string. Being able to specify the duration with a command line argument would be slick as well.

from vnstat.

vergoh avatar vergoh commented on July 23, 2024

You can already provide -tr with a numeric parameter that will then define the duration in seconds. At least the man page has that documentation. :-)

The 2 second minimum is there to a least average the result a little bit. I recall that the data source vnStat uses updates only about once every second.

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.