]> granicus.if.org Git - vnstat/log
vnstat
5 years agoimprove test coverage
Teemu Toivola [Thu, 12 Sep 2019 18:58:49 +0000 (21:58 +0300)]
improve test coverage

5 years agoimprove test coverage
Teemu Toivola [Thu, 12 Sep 2019 16:34:25 +0000 (19:34 +0300)]
improve test coverage

5 years agoimprove test coverage
Teemu Toivola [Thu, 12 Sep 2019 16:24:19 +0000 (19:24 +0300)]
improve test coverage

5 years agoautoformat
Teemu Toivola [Thu, 12 Sep 2019 14:35:13 +0000 (17:35 +0300)]
autoformat

5 years agosuppress unnecessary test output
Teemu Toivola [Thu, 12 Sep 2019 14:33:14 +0000 (17:33 +0300)]
suppress unnecessary test output

5 years agofix test execution flow to be as intended
Teemu Toivola [Wed, 11 Sep 2019 19:21:38 +0000 (22:21 +0300)]
fix test execution flow to be as intended

5 years agoimprove test coverage
Teemu Toivola [Wed, 11 Sep 2019 19:11:42 +0000 (22:11 +0300)]
improve test coverage

5 years agoimprove test coverage
Teemu Toivola [Wed, 11 Sep 2019 17:21:06 +0000 (20:21 +0300)]
improve test coverage

5 years agorefactor timeused() test to not expect specific range of system performance
Teemu Toivola [Fri, 6 Sep 2019 23:24:35 +0000 (02:24 +0300)]
refactor timeused() test to not expect specific range of system performance

5 years agoMerge pull request #137 from cgzones/devel
Teemu Toivola [Fri, 6 Sep 2019 21:03:26 +0000 (00:03 +0300)]
Merge pull request #137 from cgzones/devel

fix Coverity findings

5 years agofix double close in updatedirownerid
Christian Göttsche [Fri, 6 Sep 2019 15:59:57 +0000 (17:59 +0200)]
fix double close in updatedirownerid

after successfully passing 'dir_fd' to 'fdopendir' is must not be closed manually

found by Coverity

5 years agofix resource leak in db_getinterfaceinfo
Christian Göttsche [Fri, 6 Sep 2019 15:54:57 +0000 (17:54 +0200)]
fix resource leak in db_getinterfaceinfo

if 'ifaceidin' gets initialized but it's length is 0, it is not freed

found by Coverity

5 years agofix resource leak in db_getdata_range
Christian Göttsche [Fri, 6 Sep 2019 15:51:53 +0000 (17:51 +0200)]
fix resource leak in db_getdata_range

if an invalid 'table' is given the function returns without freeing 'ifaceidin'
postpone the initialization

found by Coverity

5 years agoMerge pull request #136 from hoexter/lintian-typo-unknown
Teemu Toivola [Wed, 4 Sep 2019 19:25:47 +0000 (22:25 +0300)]
Merge pull request #136 from hoexter/lintian-typo-unknown

fix small typo - reported by lintian during Debian package validation

5 years agofix small typo - reported by lintian during Debian package validation
Sven Höxter [Tue, 3 Sep 2019 06:56:57 +0000 (08:56 +0200)]
fix small typo - reported by lintian during Debian package validation

5 years agoimprove vnstat parseargs test coverage, fix minor findings
Teemu Toivola [Sat, 31 Aug 2019 13:38:12 +0000 (16:38 +0300)]
improve vnstat parseargs test coverage, fix minor findings

5 years agoimport kFreeBSD fix from Debian
Teemu Toivola [Wed, 21 Aug 2019 18:28:34 +0000 (21:28 +0300)]
import kFreeBSD fix from Debian

5 years agoimprove test coverage
Teemu Toivola [Wed, 21 Aug 2019 18:27:07 +0000 (21:27 +0300)]
improve test coverage

5 years agohandleshowdatabases() -> handleshowdata()
Teemu Toivola [Mon, 19 Aug 2019 18:17:42 +0000 (21:17 +0300)]
handleshowdatabases() -> handleshowdata()

5 years agorefactor vnstati.c
Teemu Toivola [Mon, 19 Aug 2019 17:40:06 +0000 (20:40 +0300)]
refactor vnstati.c

5 years agorefactor vnstatd.c
Teemu Toivola [Mon, 19 Aug 2019 17:31:55 +0000 (20:31 +0300)]
refactor vnstatd.c

5 years agoextract arg parser to separate function making vnstat main() much more readable
Teemu Toivola [Mon, 19 Aug 2019 17:19:37 +0000 (20:19 +0300)]
extract arg parser to separate function making vnstat main() much more readable

5 years agohide expected error message in interface rename test
Teemu Toivola [Mon, 19 Aug 2019 16:56:44 +0000 (19:56 +0300)]
hide expected error message in interface rename test

5 years agomove functions from vnstat.c to vnstat_func.c
Teemu Toivola [Mon, 19 Aug 2019 16:49:19 +0000 (19:49 +0300)]
move functions from vnstat.c to vnstat_func.c

5 years agoupdate vnstatd man page section reference in systemd service file examples
Teemu Toivola [Sun, 18 Aug 2019 20:41:35 +0000 (23:41 +0300)]
update vnstatd man page section reference in systemd service file examples

5 years agobump version to 2.5 beta
Teemu Toivola [Sun, 18 Aug 2019 20:02:33 +0000 (23:02 +0300)]
bump version to 2.5 beta

5 years agofinal preparations for version 2.4 release v2.4
Teemu Toivola [Sun, 18 Aug 2019 12:25:21 +0000 (15:25 +0300)]
final preparations for version 2.4 release

5 years agoimplement --rename for renaming interfaces already existing the database
Teemu Toivola [Wed, 14 Aug 2019 19:02:58 +0000 (22:02 +0300)]
implement --rename for renaming interfaces already existing the database

5 years agofix and rename tests
Teemu Toivola [Tue, 13 Aug 2019 20:59:45 +0000 (23:59 +0300)]
fix and rename tests

5 years agoimprove database error retry error message, increase retry count from 3 to 5, clarify...
Teemu Toivola [Tue, 13 Aug 2019 20:51:39 +0000 (23:51 +0300)]
improve database error retry error message, increase retry count from 3 to 5, clarify behaviour in comment, update changelog

5 years agoremove duplicated database transaction rollback
Teemu Toivola [Mon, 12 Aug 2019 20:55:46 +0000 (23:55 +0300)]
remove duplicated database transaction rollback

5 years agothere's only one database
Teemu Toivola [Wed, 31 Jul 2019 21:19:40 +0000 (00:19 +0300)]
there's only one database

5 years agohandle cleanup of top entries within a transaction
Teemu Toivola [Sun, 28 Jul 2019 17:16:10 +0000 (20:16 +0300)]
handle cleanup of top entries within a transaction

5 years agoimprove daemon resiliency against database locks caused by reads from other processes...
Teemu Toivola [Sun, 28 Jul 2019 15:11:17 +0000 (18:11 +0300)]
improve daemon resiliency against database locks caused by reads from other processes, fix possibility of transaction within transaction error after chain of other errors

5 years agovnstati: close database before writing output in order to reduce the time the databas...
Teemu Toivola [Sat, 27 Jul 2019 14:28:16 +0000 (17:28 +0300)]
vnstati: close database before writing output in order to reduce the time the database is being kept open

5 years agomove vnstatd man page from section 1 to section 8
Teemu Toivola [Mon, 22 Jul 2019 21:22:09 +0000 (00:22 +0300)]
move vnstatd man page from section 1 to section 8

5 years agomention the CHANGES file in readme files
Teemu Toivola [Thu, 18 Jul 2019 11:31:09 +0000 (14:31 +0300)]
mention the CHANGES file in readme files

5 years agoallow vnstatd to fork() when --daemon is used even when started by PID 1
Teemu Toivola [Thu, 18 Jul 2019 11:23:20 +0000 (14:23 +0300)]
allow vnstatd to fork() when --daemon is used even when started by PID 1

5 years agobump version to 2.4 beta
Teemu Toivola [Wed, 10 Jul 2019 19:54:23 +0000 (22:54 +0300)]
bump version to 2.4 beta

5 years agofinal preparations for version 2.3 release v2.3
Teemu Toivola [Wed, 10 Jul 2019 14:33:27 +0000 (17:33 +0300)]
final preparations for version 2.3 release

5 years agofix height allocation and spacing of some image outputs being a little bit too small...
Teemu Toivola [Wed, 10 Jul 2019 14:00:38 +0000 (17:00 +0300)]
fix height allocation and spacing of some image outputs being a little bit too small than intended

5 years agofix Travis configuration
Teemu Toivola [Sun, 7 Jul 2019 23:16:21 +0000 (02:16 +0300)]
fix Travis configuration

5 years agoshow error if Check doesn't have fork mode enabled when tests are executed
Teemu Toivola [Sun, 7 Jul 2019 23:10:51 +0000 (02:10 +0300)]
show error if Check doesn't have fork mode enabled when tests are executed

5 years agofix tests to work even if check has been compiled without fork support
Teemu Toivola [Sun, 7 Jul 2019 22:35:32 +0000 (01:35 +0300)]
fix tests to work even if check has been compiled without fork support

5 years agoremove some unused and no longer needed implementation, fix few cppcheck style warnings
Teemu Toivola [Sat, 6 Jul 2019 13:19:40 +0000 (16:19 +0300)]
remove some unused and no longer needed implementation, fix few cppcheck style warnings

5 years agoin tests, replace use of timelocal() with mktime(), timelocal() is a nonstandard...
Teemu Toivola [Tue, 2 Jul 2019 20:51:29 +0000 (23:51 +0300)]
in tests, replace use of timelocal() with mktime(), timelocal() is a nonstandard GNU extension and not supported by musl

5 years agomake test execution possible even when current user or group doesn't exist
Teemu Toivola [Sat, 29 Jun 2019 16:39:18 +0000 (19:39 +0300)]
make test execution possible even when current user or group doesn't exist

5 years agofix interface list ordering and simplify iflist structure
Teemu Toivola [Fri, 28 Jun 2019 22:22:09 +0000 (01:22 +0300)]
fix interface list ordering and simplify iflist structure

5 years agoseparate debug error prints from regular error prints
Teemu Toivola [Fri, 28 Jun 2019 15:19:31 +0000 (18:19 +0300)]
separate debug error prints from regular error prints

5 years agoremove redundant dirname variable
Teemu Toivola [Thu, 27 Jun 2019 20:28:47 +0000 (23:28 +0300)]
remove redundant dirname variable

5 years agofix interfaces having the possibility of staying marked as disabled after coming...
Teemu Toivola [Tue, 25 Jun 2019 19:37:18 +0000 (22:37 +0300)]
fix interfaces having the possibility of staying marked as disabled after coming back online while still getting correctly monitored

5 years agofilter out local and invalid interfaces from interface lists
Teemu Toivola [Sun, 16 Jun 2019 19:23:12 +0000 (22:23 +0300)]
filter out local and invalid interfaces from interface lists

5 years agofix bsd compiler warnings and errors
Teemu Toivola [Sun, 16 Jun 2019 15:12:11 +0000 (18:12 +0300)]
fix bsd compiler warnings and errors

5 years agoadd tests for iflist
Teemu Toivola [Sun, 16 Jun 2019 14:49:49 +0000 (17:49 +0300)]
add tests for iflist

5 years agoadd null check to database close
Teemu Toivola [Sun, 16 Jun 2019 14:30:32 +0000 (17:30 +0300)]
add null check to database close

5 years agorefactoring
Teemu Toivola [Sun, 16 Jun 2019 14:16:29 +0000 (17:16 +0300)]
refactoring

5 years agoautomatic interface selection when the Interface configuration setting is left empty...
Teemu Toivola [Sun, 16 Jun 2019 13:58:26 +0000 (16:58 +0300)]
automatic interface selection when the Interface configuration setting is left empty, eth0 is no longer the hardcoded default

5 years agocontinue daemon process execution with data caching if database writes fail due to...
Teemu Toivola [Sun, 19 May 2019 14:57:33 +0000 (17:57 +0300)]
continue daemon process execution with data caching if database writes fail due to disk being full

5 years agofix pid file path in debian and redhat init.d example files
Teemu Toivola [Thu, 16 May 2019 20:54:27 +0000 (23:54 +0300)]
fix pid file path in debian and redhat init.d example files

5 years agoremove unused includes
Teemu Toivola [Wed, 15 May 2019 17:06:52 +0000 (20:06 +0300)]
remove unused includes

5 years agorefactor daemon addinterfaces() to use interface list structure
Teemu Toivola [Tue, 14 May 2019 20:11:33 +0000 (23:11 +0300)]
refactor daemon addinterfaces() to use interface list structure

5 years agorefactor interface list output
Teemu Toivola [Tue, 14 May 2019 19:41:54 +0000 (22:41 +0300)]
refactor interface list output

5 years agorefactor interface list to improve reusability
Teemu Toivola [Tue, 14 May 2019 18:14:01 +0000 (21:14 +0300)]
refactor interface list to improve reusability

5 years agobump beta version
Teemu Toivola [Tue, 14 May 2019 17:47:09 +0000 (20:47 +0300)]
bump beta version

5 years agolog warning also when Write-Ahead Logging checkpoint is slow
Teemu Toivola [Mon, 13 May 2019 20:55:47 +0000 (23:55 +0300)]
log warning also when Write-Ahead Logging checkpoint is slow

5 years agorename configuration option WriteAheadLoggingDatabase -> DatabaseWriteAheadLogging...
Teemu Toivola [Mon, 13 May 2019 17:46:15 +0000 (20:46 +0300)]
rename configuration option WriteAheadLoggingDatabase -> DatabaseWriteAheadLogging in order to have a more consistent prefix with those options that control SQLite pragmas

5 years agoexpose SQLite synchronous flag as DatabaseSynchronous in configuration with default...
Teemu Toivola [Mon, 13 May 2019 17:25:11 +0000 (20:25 +0300)]
expose SQLite synchronous flag as DatabaseSynchronous in configuration with default value depending on the setting of WriteAheadLoggingDatabase

5 years agoreduce number of decimals in the warning output
Teemu Toivola [Sun, 12 May 2019 15:16:15 +0000 (18:16 +0300)]
reduce number of decimals in the warning output

5 years agomove timeout definition, mention addition in changes
Teemu Toivola [Sat, 11 May 2019 18:38:14 +0000 (21:38 +0300)]
move timeout definition, mention addition in changes

5 years agodb_walcheckpoint() is timed so no extra debug print is needed
Teemu Toivola [Sat, 11 May 2019 17:29:39 +0000 (20:29 +0300)]
db_walcheckpoint() is timed so no extra debug print is needed

5 years agoshow warning in log if writing cached data to database takes longer than 3 seconds...
Teemu Toivola [Fri, 10 May 2019 22:43:15 +0000 (01:43 +0300)]
show warning in log if writing cached data to database takes longer than 3 seconds, it should take less than a second normally

5 years agorefactor debugging of time used in functions
Teemu Toivola [Fri, 10 May 2019 22:23:35 +0000 (01:23 +0300)]
refactor debugging of time used in functions

5 years agofix missing break
Teemu Toivola [Fri, 10 May 2019 19:49:47 +0000 (22:49 +0300)]
fix missing break

5 years agoadd configure check for SQLite WAL mode support in order to support versions without...
Teemu Toivola [Fri, 10 May 2019 19:23:16 +0000 (22:23 +0300)]
add configure check for SQLite WAL mode support in order to support versions without it, add warning level logging support, show warning during daemon startup if WriteAheadLoggingDatabase is enabled but not supported

5 years agoreplace SQLITE_CHECKPOINT_TRUNCATE with SQLITE_CHECKPOINT_RESTART due to limited...
Teemu Toivola [Thu, 9 May 2019 20:43:58 +0000 (23:43 +0300)]
replace SQLITE_CHECKPOINT_TRUNCATE with SQLITE_CHECKPOINT_RESTART due to limited support in older SQLite versions

5 years agocheckpoint wal database every 4 hours, add debug timing for daemon startup sequence
Teemu Toivola [Thu, 9 May 2019 20:39:15 +0000 (23:39 +0300)]
checkpoint wal database every 4 hours, add debug timing for daemon startup sequence

5 years agoset/increase database busy timeout to 5 seconds when in read-only mode
Teemu Toivola [Wed, 8 May 2019 20:38:54 +0000 (23:38 +0300)]
set/increase database busy timeout to 5 seconds when in read-only mode

5 years agoremove strerror(errno) information from secondary error prints when opening the datab...
Teemu Toivola [Wed, 8 May 2019 20:19:59 +0000 (23:19 +0300)]
remove strerror(errno) information from secondary error prints when opening the database has failed, that information can be misleading when the error is sqlite related in which case the earlier error print has anyway the correct information

5 years agoignore anything that starts with the database name during legacy db import instead...
Teemu Toivola [Wed, 8 May 2019 20:10:59 +0000 (23:10 +0300)]
ignore anything that starts with the database name during legacy db import instead of the exact name of the database, this avoids possible issues with possible automatically created secondary sqlite files

5 years agoadd optional support for SQLite Write-Ahead Logging mode
Teemu Toivola [Tue, 7 May 2019 21:37:07 +0000 (00:37 +0300)]
add optional support for SQLite Write-Ahead Logging mode

5 years agoprovide alternative more simple systemd service file designed to work with also older...
Teemu Toivola [Mon, 6 May 2019 21:43:46 +0000 (00:43 +0300)]
provide alternative more simple systemd service file designed to work with also older systemd versions

5 years agoincrease example systemd service restart delay from default 100ms to 2s, configure...
Teemu Toivola [Mon, 6 May 2019 15:44:21 +0000 (18:44 +0300)]
increase example systemd service restart delay from default 100ms to 2s, configure start rate limits, define ReadWritePaths (which can't be /var/lib/vnstat) to support those systems with such systemd version which supports ProtectSystem=strict but not StateDirectory, closes #131

5 years agofix also summary estimates after previous commit
Teemu Toivola [Wed, 1 May 2019 21:09:14 +0000 (00:09 +0300)]
fix also summary estimates after previous commit

5 years agofix traffic rate not being shown for the last entry of most lists during the first...
Teemu Toivola [Wed, 1 May 2019 17:34:20 +0000 (20:34 +0300)]
fix traffic rate not being shown for the last entry of most lists during the first update of the next period

5 years agorefactoring to improve comparison readability
Teemu Toivola [Wed, 1 May 2019 13:34:23 +0000 (16:34 +0300)]
refactoring to improve comparison readability

5 years agobump version to 2.3 beta
Teemu Toivola [Tue, 30 Apr 2019 22:47:56 +0000 (01:47 +0300)]
bump version to 2.3 beta

5 years agofinal preparations for version 2.2 release v2.2
Teemu Toivola [Sun, 28 Apr 2019 13:31:20 +0000 (16:31 +0300)]
final preparations for version 2.2 release

5 years agofix comparisons of previous commit
Teemu Toivola [Sun, 28 Apr 2019 11:49:11 +0000 (14:49 +0300)]
fix comparisons of previous commit

5 years agofix traffic rate calculation for the last entry of the 5 minute resolution list,...
Teemu Toivola [Sun, 28 Apr 2019 10:59:43 +0000 (13:59 +0300)]
fix traffic rate calculation for the last entry of the 5 minute resolution list, use the timestamp of the beginning of traffic measurement period when storing data instead instead of the end of it

5 years agoadjust UpdateInterval during daemon startup if found to be too high compared to MaxBa...
Teemu Toivola [Wed, 24 Apr 2019 11:52:17 +0000 (14:52 +0300)]
adjust UpdateInterval during daemon startup if found to be too high compared to MaxBandwidth in order to avoid missing 32-bit interface counter rollovers

5 years agorefactor config validation and add more tests
Teemu Toivola [Wed, 24 Apr 2019 10:40:46 +0000 (13:40 +0300)]
refactor config validation and add more tests

5 years agofix DefaultDecimals setting, it wasn't controlling all outputs, add missing tests
Teemu Toivola [Mon, 22 Apr 2019 15:40:06 +0000 (18:40 +0300)]
fix DefaultDecimals setting, it wasn't controlling all outputs, add missing tests

5 years agoadd note for changed default value of UpdateInterval
Teemu Toivola [Sat, 20 Apr 2019 22:22:20 +0000 (01:22 +0300)]
add note for changed default value of UpdateInterval

5 years agobump beta version
Teemu Toivola [Sat, 20 Apr 2019 18:16:49 +0000 (21:16 +0300)]
bump beta version

5 years agoimplement workaround for interface drivers (such as brcmfmac) that provide only 32...
Teemu Toivola [Sat, 20 Apr 2019 18:14:39 +0000 (21:14 +0300)]
implement workaround for interface drivers (such as brcmfmac) that provide only 32-bit range values when 64-bit interface counters are used

5 years agoimprove info print when traffic rate is higher than set maximum, decrease default...
Teemu Toivola [Sat, 20 Apr 2019 17:27:42 +0000 (20:27 +0300)]
improve info print when traffic rate is higher than set maximum, decrease default UpdateInterval from 30 to 20 seconds in order to be on the safer side with 1000 Mbit interfaces using 32-bit interface counters

5 years agoimprove 64-bit interface counter detection
Teemu Toivola [Sat, 20 Apr 2019 16:34:03 +0000 (19:34 +0300)]
improve 64-bit interface counter detection

5 years agoreduce transfer rate calculation safety margin from 10% to 2% to avoid false positive...
Teemu Toivola [Sat, 20 Apr 2019 16:11:26 +0000 (19:11 +0300)]
reduce transfer rate calculation safety margin from 10% to 2% to avoid false positives with high rate interfaces

5 years agoimprove --json and --xml output documentation regarding the field that should be...
Teemu Toivola [Sat, 20 Apr 2019 15:07:43 +0000 (18:07 +0300)]
improve --json and --xml output documentation regarding the field that should be used for API version checks in 3rd party implementations, closes #127

5 years agochanges in interface specific detected bandwidth limits are reported in the log
Teemu Toivola [Mon, 15 Apr 2019 15:16:42 +0000 (18:16 +0300)]
changes in interface specific detected bandwidth limits are reported in the log