Comments (4)
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.
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
apt-get build-dep vnstat
apt-get source vnstat
- pull the latest vnstat source package, extract it and add the
debian
directory there from what the previous command provided - there's going to be some control file somewhere defining the package version which needs to be updated to match the latest release
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.
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.
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)
- 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
- Wireguard interface disabled, can't enable HOT 3
- Reset db in version 2 HOT 2
- do not exit with non-zero exit code when using `--alert` flag and `Failed to open database "/var/lib/vnstat/vnstat.db" in read-only mode.` throws HOT 5
- Accessing Vnstat figures HOT 2
- Send interface traffic result periodically to external server (URL) to avoid writing in the device HOT 2
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.