Message ID | 20220416145347.287684-1-matthias.fischer@ipfire.org |
---|---|
State | Accepted |
Commit | c516ba3b01b93cd4d549cf92b70f4eb58fd95d20 |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Kgbmz2PJgz3x1Y for <patchwork@web04.haj.ipfire.org>; Sat, 16 Apr 2022 14:53:55 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Kgbmx4jp2zj4; Sat, 16 Apr 2022 14:53:53 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Kgbmx39Njz2ynw; Sat, 16 Apr 2022 14:53:53 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Kgbmw0Q7fz2xLF for <development@lists.ipfire.org>; Sat, 16 Apr 2022 14:53:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Kgbmv2v0czj4 for <development@lists.ipfire.org>; Sat, 16 Apr 2022 14:53:51 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1650120831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1iNld5VohHl4vUkmNe4B6NcXFQvcHyKJQFIMkJvnVU8=; b=zxod+JoMmRoVYfU58uqjoz1ok3DLXD/QFTIdVNziP6eDLf2J73UL/OTYSqP77Kg9cdmwW5 I9sJFtF+bVodr5BQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1650120831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1iNld5VohHl4vUkmNe4B6NcXFQvcHyKJQFIMkJvnVU8=; b=CePafFZxa2ecnHdmlBdHkDbwCUIUbKSn5gOwTysZBV0V3YScuh6BC6HQHz0l55sapC7wTj HtPUVO/z5JEbP8cWHrzRkO8rnTE016tolYdxFQYwfu75yrrbJNV/efrfsF7Fj8K9oBIjV7 Mi4U9VnrMQOLuyOAiMZ8Iq9ZT7AYzalRI+o+uDpfTQNPOOej4maCABPkyXRxw2K+CI/iVq KDoJWtegBdswKKR1ZPeSEfmWaxsmYz5FYI8OXPCCoOtVKbzFLa3YxjU9jWo1wTKiZ2Fl6g YSnvdR65nsyAkmlyY3Vlfozg71bQ9TSe0k19vu3c54g2RaNi1i1eXGODKcdNwQ== From: Matthias Fischer <matthias.fischer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] vnstat: Update to 2.9 Date: Sat, 16 Apr 2022 16:53:47 +0200 Message-Id: <20220416145347.287684-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
vnstat: Update to 2.9
|
|
Commit Message
Matthias Fischer
April 16, 2022, 2:53 p.m. UTC
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(-)
Comments
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
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