Coder Social home page Coder Social logo

Comments (4)

Waldorf3 avatar Waldorf3 commented on July 4, 2024 1

omg, you're right. Of all the servers running bookworm, the one I installed it on first was still running bullseye. Duh. Well, upgraded and problem solved.

Tested it with --alert, this is some premium class software, love the configurability, well done!

Thanks, and sorry for wasting your time.

from vnstat.

vergoh avatar vergoh commented on July 4, 2024

At least I'm not maintaining any distribution release specific binary builds currently. In addition to the source package, there's the docker container image available from both ghcr and dockerhub + that snap you've already found.

Assuming you have the same CPU architecture available in some non-production development environment (or VM), you should be able to backport the latest vnStat release to Debian Bookworm with relative ease using the Debian packaging setup from the older release as base and then create the .deb file which you can then transfer to the production servers and upgrade the existing version. I suspect Debian has somewhere also official documentation on how to do this but the way I recall the process is something like

  1. apt-get build-dep vnstat
  2. apt-get source vnstat
  3. pull the latest vnstat source package, extract it and add the debian directory there from what the previous command provided
  4. there's going to be some control file somewhere defining the package version which needs to be updated to match the latest release
  5. debian/rules binary and if that's still a valid process and nothing went wrong then you should now have .deb files built

Obviously ymmv, I haven't tested this in several years.

from vnstat.

Waldorf3 avatar Waldorf3 commented on July 4, 2024

Recompiling system binaries are unfortunately beyond my paygrade. The docker solution would work on servers with docker but maybe a bit of an overkill otherwise.

Going with vnstat 2.6, is there a way to force the output into MB/GB/TB rather than let it auto-adjust? I want to use the estimate output to be able to send a warning if traffic estimates exceeds limits. I could simply do something like vnstat -m | grep estimated | awk '{printf "%d\n", $8}' - if only i could be sure whether the value is MB/GB/TB...

from vnstat.

vergoh avatar vergoh commented on July 4, 2024

If you are comfortable compiling binaries from source packge then the extra steps needed for creating the .deb package when the debian files for an earlier release using the same build mechanism exists shouldn't be that big of a step.

Are you sure you have Debian Bookworm in use and not Bullseye? According to https://packages.debian.org/search?keywords=vnstat the vnStat version available in Bookworm should be 2.10 instead of the 2.6 you've mentioned.

Normally I'd suggest that you'd use --json instead of trying to parse the more human readable outputs but --json doesn't have the estimates included that you are looking for. There's also no option for disabling the automatic unit changes because the used columns lack the ability of adjusting the width based on the length of the values. That --json should still be usable but you'd need to calculate the estimate based on the current value, update time and days of month, which is something that's not going to be pretty if done as a one liner with shell commands.

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.