Triggered by Bug #12846 - in this context I noticed that vnstat had been updated to version 2.9.
For details see: https://humdi.net/vnstat/CHANGES
"2.9 / 23-Jan-2022
- Fixed - RescanDatabaseOnSave configuration option wasn't being read from the configuration file resulting in the feature always being enabled - Hourly graph image output using large fonts didn't correctly fade out the x-axis line for hours not having data available - New - Add --alert for producing output and/or specific exit status when configured condition and transfer limit is exceeded, can also be used for "quota remaining" type of queries depending on used parameters - Add configuration option InterfaceMatchMethod which allows configuring the possibility of specifying an interface for database queries by using its alias instead of system provided interface name, enabled by default to support case insensitive matching of the beginning of interface aliases (vnstat and vnstati) - Image output file extension allows selecting the used image file format as long as the used LibGD supports it, PNG is no longer the only option - Add configuration option HourlyGraphMode for changing the output mode of the graph, 0 = 24 hour sliding window (default, as in previous releases), 1 = graph begins from midnight - Add mode parameter for -hg / --hoursgraph options for overriding the HourlyGraphMode configuration option setting from the command line - Add vertical line to image output hourly graph to visualize midnight - Add -t / --timestamp options to daemon for enabling timestamps to prints when the daemon is running in the foreground attached to a terminal - Accept ; as comment character in configuration file in addition to # - Comment out keywords which are using default values with ; character in provided configuration file and --showconfig output
2.8 / 4-Sep-2021
- Fixed - Using a combination of --live and --json wasn't flushing stdout after each line resulting in buffered output if the output was being piped - Image output would fail to show the last line bar graph in list outputs if EstimateStyle was 0, BarColumnShowsRate was 1 and the last line had a higher traffic rate than other lines - Image output didn't correctly horizontally align the "no data available" message in 5 minute graph depending on the width of the image - Image output related configuration warnings could get shown when image output wasn't being used - Warnings of mismatches between image output and data retention configuration didn't provide relevant details for solving the issues - BandwidthDetection was being used for tun interfaces even when the Linux kernel had the information hardcoded to 10 Mbit regardless of the used real interface, interface specific MaxBW will now be used instead or MaxBandwidth as fallback - Configured interface specific MaxBW values were getting overridden by BandwidthDetection when something could be detected - Image output horizontal rx/tx bars often had one pixel too much width in the tx section resulting in slightly wrong ratio getting shown - Top days list wasn't always sorting entries with exactly the same traffic sum using ascending date - 64bitInterfaceCounters with value -2 always assumed 32-bit on Linux systems until a 64-bit value was seen if kernel headers weren't available when binaries were built - New - Add the possibility of specifying an interface without using the -i / --iface options (vnstat and vnstati) - The daemon can discover added interfaces from the database without requiring a restart, configurable with option RescanDatabaseOnSave - Add configuration option UseUTC for using UTC as timezone for database entries instead of following the system timezone configuration - --iflist uses user configured interface specific MaxBW values in the output when available instead of showing only the kernel provided information when detected - Add configuration option AlwaysAddNewInterfaces to expose the daemon --alwaysadd command line option which gains an optional mode parameter - Image output uses LibGD filled arc bug workaround only for LibGD versions that are known to be broken - Image output example cgi (examples/vnstat.cgi) improvements - Automatically lists all monitored interfaces instead of requiring the list to be filled manually, server name in page title comes from hostname command by default - Provides links for most available images to more detailed or longer versions of each image - Allows direct interface specific page access with /interfacename suffix for the cgi if the used httpd supports PATH_INFO - Page auto refresh can be enabled with configurable interval"
Please note: As mentioned above, the default values in 2.9 are commented out. I have reversed this by adding a simple 'sed' command to the lfs file.
Another possibility would have been to extend the existing sed commands. If this is desired differently, please report.
As - nearly - always: running here with no seen problems...
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org --- lfs/vnstat | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lfs/vnstat b/lfs/vnstat index e4859be0b..a7b28f3fd 100644 --- a/lfs/vnstat +++ b/lfs/vnstat @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2021 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2022 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@
include Config
-VER = 2.7 +VER = 2.9
THISAPP = vnstat-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = f7b50cccfe4b62bce45751e6029650dc6d8ac7b7925cc4177fb1772c6d842b5201f6834d5e6374016b4c42374660b1c127d5b021adffe873de0a4c484171b6b3 +$(DL_FILE)_BLAKE2 = 1671fe49f3add0087431b57aaa69d4c6280066a299e6899c00cd5bf6ec21380d1457295f884f683ebfb89959eea08a9d900e898a865e3f6ff2a82ecf354d974a
install : $(TARGET)
@@ -80,6 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && make all $(MAKETUNING) LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes" cd $(DIR_APP) && make install + sed -i 's|^;||g' /etc/vnstat.conf sed -i 's|SaveInterval 5|SaveInterval 1|g' /etc/vnstat.conf sed -i 's|/var/lib/vnstat|/var/log/vnstat|g' /etc/vnstat.conf sed -i 's|/var/log/vnstat/vnstat.log|/var/log/vnstat.log|g' /etc/vnstat.conf
Reviewed-by: Peter Müller peter.mueller@ipfire.org
Triggered by Bug #12846 - in this context I noticed that vnstat had been updated to version 2.9.
For details see: https://humdi.net/vnstat/CHANGES
"2.9 / 23-Jan-2022
- Fixed
- RescanDatabaseOnSave configuration option wasn't being read from the configuration file resulting in the feature always being enabled
- Hourly graph image output using large fonts didn't correctly fade out the x-axis line for hours not having data available
- New
- Add --alert for producing output and/or specific exit status when configured condition and transfer limit is exceeded, can also be used for "quota remaining" type of queries depending on used parameters
- Add configuration option InterfaceMatchMethod which allows configuring the possibility of specifying an interface for database queries by using its alias instead of system provided interface name, enabled by default to support case insensitive matching of the beginning of interface aliases (vnstat and vnstati)
- Image output file extension allows selecting the used image file format as long as the used LibGD supports it, PNG is no longer the only option
- Add configuration option HourlyGraphMode for changing the output mode of the graph, 0 = 24 hour sliding window (default, as in previous releases), 1 = graph begins from midnight
- Add mode parameter for -hg / --hoursgraph options for overriding the HourlyGraphMode configuration option setting from the command line
- Add vertical line to image output hourly graph to visualize midnight
- Add -t / --timestamp options to daemon for enabling timestamps to prints when the daemon is running in the foreground attached to a terminal
- Accept ; as comment character in configuration file in addition to #
- Comment out keywords which are using default values with ; character in provided configuration file and --showconfig output
2.8 / 4-Sep-2021
- Fixed
- Using a combination of --live and --json wasn't flushing stdout after each line resulting in buffered output if the output was being piped
- Image output would fail to show the last line bar graph in list outputs if EstimateStyle was 0, BarColumnShowsRate was 1 and the last line had a higher traffic rate than other lines
- Image output didn't correctly horizontally align the "no data available" message in 5 minute graph depending on the width of the image
- Image output related configuration warnings could get shown when image output wasn't being used
- Warnings of mismatches between image output and data retention configuration didn't provide relevant details for solving the issues
- BandwidthDetection was being used for tun interfaces even when the Linux kernel had the information hardcoded to 10 Mbit regardless of the used real interface, interface specific MaxBW will now be used instead or MaxBandwidth as fallback
- Configured interface specific MaxBW values were getting overridden by BandwidthDetection when something could be detected
- Image output horizontal rx/tx bars often had one pixel too much width in the tx section resulting in slightly wrong ratio getting shown
- Top days list wasn't always sorting entries with exactly the same traffic sum using ascending date
- 64bitInterfaceCounters with value -2 always assumed 32-bit on Linux systems until a 64-bit value was seen if kernel headers weren't available when binaries were built
- New
- Add the possibility of specifying an interface without using the -i / --iface options (vnstat and vnstati)
- The daemon can discover added interfaces from the database without requiring a restart, configurable with option RescanDatabaseOnSave
- Add configuration option UseUTC for using UTC as timezone for database entries instead of following the system timezone configuration
- --iflist uses user configured interface specific MaxBW values in the output when available instead of showing only the kernel provided information when detected
- Add configuration option AlwaysAddNewInterfaces to expose the daemon --alwaysadd command line option which gains an optional mode parameter
- Image output uses LibGD filled arc bug workaround only for LibGD versions that are known to be broken
- Image output example cgi (examples/vnstat.cgi) improvements
- Automatically lists all monitored interfaces instead of requiring the list to be filled manually, server name in page title comes from hostname command by default
- Provides links for most available images to more detailed or longer versions of each image
- Allows direct interface specific page access with /interfacename suffix for the cgi if the used httpd supports PATH_INFO
- Page auto refresh can be enabled with configurable interval"
Please note: As mentioned above, the default values in 2.9 are commented out. I have reversed this by adding a simple 'sed' command to the lfs file.
Another possibility would have been to extend the existing sed commands. If this is desired differently, please report.
As - nearly - always: running here with no seen problems...
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org
lfs/vnstat | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lfs/vnstat b/lfs/vnstat index e4859be0b..a7b28f3fd 100644 --- a/lfs/vnstat +++ b/lfs/vnstat @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2021 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2022 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@
include Config
-VER = 2.7 +VER = 2.9
THISAPP = vnstat-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = f7b50cccfe4b62bce45751e6029650dc6d8ac7b7925cc4177fb1772c6d842b5201f6834d5e6374016b4c42374660b1c127d5b021adffe873de0a4c484171b6b3 +$(DL_FILE)_BLAKE2 = 1671fe49f3add0087431b57aaa69d4c6280066a299e6899c00cd5bf6ec21380d1457295f884f683ebfb89959eea08a9d900e898a865e3f6ff2a82ecf354d974a
install : $(TARGET)
@@ -80,6 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && make all $(MAKETUNING) LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes" cd $(DIR_APP) && make install
- sed -i 's|^;||g' /etc/vnstat.conf sed -i 's|SaveInterval 5|SaveInterval 1|g' /etc/vnstat.conf sed -i 's|/var/lib/vnstat|/var/log/vnstat|g' /etc/vnstat.conf sed -i 's|/var/log/vnstat/vnstat.log|/var/log/vnstat.log|g' /etc/vnstat.conf