]>
granicus.if.org Git - vnstat/log
Teemu Toivola [Mon, 5 Mar 2018 20:05:05 +0000 (22:05 +0200)]
ignore clang _XOPEN_SOURCE warning as it doesn't appear to be avoidable
Teemu Toivola [Mon, 5 Mar 2018 19:32:37 +0000 (21:32 +0200)]
more warning fixes
Teemu Toivola [Mon, 5 Mar 2018 19:28:10 +0000 (21:28 +0200)]
more warning fixes
Teemu Toivola [Mon, 5 Mar 2018 18:33:03 +0000 (20:33 +0200)]
fix gcc warning
Teemu Toivola [Mon, 5 Mar 2018 18:11:13 +0000 (20:11 +0200)]
fix some clang warnings
Teemu Toivola [Mon, 5 Mar 2018 15:42:47 +0000 (17:42 +0200)]
bring back one disabled test, discard the other due to too similar content
Teemu Toivola [Sun, 4 Mar 2018 20:54:44 +0000 (22:54 +0200)]
fix cppcheck and clang warnings
Teemu Toivola [Sun, 4 Mar 2018 20:26:19 +0000 (22:26 +0200)]
add development status to README.md
Teemu Toivola [Sun, 4 Mar 2018 20:12:42 +0000 (22:12 +0200)]
wrap README.md lines as GitHub appears to be happy to unwrap sections back
Teemu Toivola [Sun, 4 Mar 2018 20:06:48 +0000 (22:06 +0200)]
merge sqldb branch, vnStat 2.0 on master begins here
Teemu Toivola [Sun, 4 Mar 2018 17:50:27 +0000 (19:50 +0200)]
bump version to 1.19 beta
Teemu Toivola [Sun, 4 Mar 2018 17:32:38 +0000 (19:32 +0200)]
adjust time sync check to not complain when daemon is stopped and started during the same second (service restart scenario)
Teemu Toivola [Sun, 4 Mar 2018 17:14:55 +0000 (19:14 +0200)]
final preparations for version 1.18 release
Teemu Toivola [Sun, 4 Mar 2018 17:03:08 +0000 (19:03 +0200)]
update example configuration file
Teemu Toivola [Sun, 4 Mar 2018 16:14:33 +0000 (18:14 +0200)]
Merge pull request #92 from cgzones/cppcheck
fix cppcheck note
Teemu Toivola [Sun, 4 Mar 2018 16:14:19 +0000 (18:14 +0200)]
Merge pull request #91 from cgzones/warnings
fix several clang compiler warnings
Christian Göttsche [Sun, 4 Mar 2018 13:05:59 +0000 (14:05 +0100)]
fix cppcheck note
[src/dbcache.c:166]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
Christian Göttsche [Thu, 1 Mar 2018 15:46:29 +0000 (16:46 +0100)]
fix clang -Wmissing-variable-declarations
./src/common.h:331:6: error: no previous extern declaration for non-static variable 'data' [-Werror,-Wmissing-variable-declarations]
DATA data;
./src/common.h:332:5: error: no previous extern declaration for non-static variable 'cfg' [-Werror,-Wmissing-variable-declarations]
CFG cfg;
./src/common.h:333:8: error: no previous extern declaration for non-static variable 'ifinfo' [-Werror,-Wmissing-variable-declarations]
IFINFO ifinfo;
./src/common.h:334:6: error: no previous extern declaration for non-static variable 'errorstring' [-Werror,-Wmissing-variable-declarations]
char errorstring[512];
./src/common.h:335:10: error: no previous extern declaration for non-static variable 'ifacebw' [-Werror,-Wmissing-variable-declarations]
ibwnode *ifacebw;
./src/common.h:336:5: error: no previous extern declaration for non-static variable 'debug' [-Werror,-Wmissing-variable-declarations]
int debug;
./src/common.h:337:5: error: no previous extern declaration for non-static variable 'noexit' [-Werror,-Wmissing-variable-declarations]
int noexit; /* = running as daemon if 2 */
./src/common.h:338:5: error: no previous extern declaration for non-static variable 'intsignal' [-Werror,-Wmissing-variable-declarations]
int intsignal;
./src/common.h:339:5: error: no previous extern declaration for non-static variable 'pidfile' [-Werror,-Wmissing-variable-declarations]
int pidfile;
./src/common.h:340:5: error: no previous extern declaration for non-static variable 'disableprints' [-Werror,-Wmissing-variable-declarations]
int disableprints;
./src/dbcache.h:24:11: error: no previous extern declaration for non-static variable 'dataptr' [-Werror,-Wmissing-variable-declarations]
datanode *dataptr;
Christian Göttsche [Thu, 1 Mar 2018 15:41:40 +0000 (16:41 +0100)]
fix clang -Wfloat-conversion
src/ifinfo.c:358:18: error: implicit conversion turns floating-point number into integer: 'float' to 'uint64_t' (aka 'unsigned long') [-Werror,-Wfloat-conversion]
maxtransfer = ceilf((maxbw/8.0f)*interval*1.1f);
Christian Göttsche [Thu, 1 Mar 2018 15:26:18 +0000 (16:26 +0100)]
fix clang -Wsign-conversion
src/ifinfo.c:329:31: error: implicit conversion changes signedness: 'int32_t' (aka 'int') to 'unsigned long' [-Werror,-Wsign-conversion]
if (data.btime < (btime-cfg.bvar)) {
Christian Göttsche [Thu, 1 Mar 2018 14:52:38 +0000 (15:52 +0100)]
fix clang -Wshorten-64-to-32
src/common.c:190:37: error: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
return data.lastupdated-mktime(&d)+timezone;
src/common.c:255:8: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
len = strlen(s);
src/cfg.c:676:17: error: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
*cset->loci = strtol(value, (char **)NULL, 0);
src/ibw.c:259:12: error: implicit conversion loses integer precision: 'long' to 'int32_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
ivalue = strtol(value, (char **)NULL, 0);
src/fs.c:50:8: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
len = strlen(tmp);
src/fs.c:96:8: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
len = strlen(dir);
src/image.c:165:47: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
gdImageString(ic->im, gdFontGetTiny(), width-(strlen(datestring)*gdFontGetTiny()->w+12), 9+ic->showedge, (unsigned char*)datestring, ic->cheaderdate);
Christian Göttsche [Thu, 1 Mar 2018 14:45:50 +0000 (15:45 +0100)]
fix clang -Wbad-function-cast
src/misc.c:370:62: error: cast from function call of type 'uint64_t' (aka 'unsigned long') to non-matching type 'float' [-Werror,-Wbad-function-cast]
snprintf(buffer, 64, "%"DECCONV"*.2f %s", len, rate/(float)getunitdivisor(unitmode, 4), getrateunitprefix(unitmode, 4));
src/misc.c:372:62: error: cast from function call of type 'uint64_t' (aka 'unsigned long') to non-matching type 'float' [-Werror,-Wbad-function-cast]
snprintf(buffer, 64, "%"DECCONV"*.2f %s", len, rate/(float)getunitdivisor(unitmode, 3), getrateunitprefix(unitmode, 3));
src/misc.c:374:62: error: cast from function call of type 'uint64_t' (aka 'unsigned long') to non-matching type 'float' [-Werror,-Wbad-function-cast]
snprintf(buffer, 64, "%"DECCONV"*.2f %s", len, rate/(float)getunitdivisor(unitmode, 2), getrateunitprefix(unitmode, 2));
src/misc.c:376:70: error: cast from function call of type 'uint64_t' (aka 'unsigned long') to non-matching type 'float' [-Werror,-Wbad-function-cast]
snprintf(buffer, 64, "%"DECCONV"*.*f %s", len, declen, rate/(float)getunitdivisor(unitmode, 1), getrateunitprefix(unitmode, 1));
Christian Göttsche [Thu, 1 Mar 2018 14:41:31 +0000 (15:41 +0100)]
fix clang -Wconversion
src/dbcache.c:38:12: error: implicit conversion loses integer precision: 'int' to 'short' [-Werror,-Wconversion]
n->sync = sync;
Teemu Toivola [Sat, 3 Mar 2018 23:08:10 +0000 (01:08 +0200)]
add prerequisites section to INSTALL files, closes #58
Teemu Toivola [Sat, 3 Mar 2018 19:23:46 +0000 (21:23 +0200)]
documentation update
Teemu Toivola [Sat, 3 Mar 2018 18:25:50 +0000 (20:25 +0200)]
add README in Markdown format with command instructions on how to get started
Teemu Toivola [Fri, 2 Mar 2018 23:03:53 +0000 (01:03 +0200)]
add make target for testing man pages for errors and warnings, most likely not shell agnostic and not intended as dependency for the check target
Teemu Toivola [Mon, 26 Feb 2018 21:50:32 +0000 (23:50 +0200)]
fix compiler warnings
Teemu Toivola [Mon, 26 Feb 2018 21:42:31 +0000 (23:42 +0200)]
add output sanity check tests for mostly unfilled databases
Teemu Toivola [Mon, 26 Feb 2018 21:36:52 +0000 (23:36 +0200)]
add section separators for improving readabilty of the vnstat -h output, configurable using HourlySectionStyle
Teemu Toivola [Mon, 26 Feb 2018 20:58:01 +0000 (22:58 +0200)]
add options for controlling the number of decimals used in outputs, reduce the default number of decimals used in hourly output from 2 to 1 in order to improve readability
Teemu Toivola [Wed, 21 Feb 2018 21:12:36 +0000 (23:12 +0200)]
remove possible division by float zero
Teemu Toivola [Wed, 21 Feb 2018 21:11:46 +0000 (23:11 +0200)]
remove possible division by float zero
Teemu Toivola [Sat, 17 Feb 2018 19:05:02 +0000 (21:05 +0200)]
make number of executed tests visible
Teemu Toivola [Sat, 17 Feb 2018 18:34:08 +0000 (20:34 +0200)]
re-enable os x in travis
Teemu Toivola [Thu, 15 Feb 2018 21:55:43 +0000 (23:55 +0200)]
fix waittimesync() timestamp handling, fixes #85
Teemu Toivola [Wed, 14 Feb 2018 21:24:51 +0000 (23:24 +0200)]
add support for combining --live and --json, closes #25
Teemu Toivola [Wed, 14 Feb 2018 16:32:02 +0000 (18:32 +0200)]
add support for combining -tr and --json, closes #56
Teemu Toivola [Tue, 13 Feb 2018 20:18:03 +0000 (22:18 +0200)]
update CHANGES
Teemu Toivola [Tue, 13 Feb 2018 20:12:54 +0000 (22:12 +0200)]
minor example file cleanup
Teemu Toivola [Tue, 13 Feb 2018 19:58:44 +0000 (21:58 +0200)]
Merge pull request #80 from cgzones/systemd_hardening
vnstat.service: add hardening and auto restart
Teemu Toivola [Tue, 13 Feb 2018 19:54:43 +0000 (21:54 +0200)]
always show used version when debug is enabled
Teemu Toivola [Sun, 11 Feb 2018 13:08:26 +0000 (15:08 +0200)]
fix compilers warnings found in tests
Teemu Toivola [Sun, 11 Feb 2018 00:39:42 +0000 (02:39 +0200)]
update CHANGES and year info, minor style cleanup
Teemu Toivola [Sun, 11 Feb 2018 00:13:09 +0000 (02:13 +0200)]
add rtc sanity check and sync wait to daemon startup, wait duration can be changed from the configuration file, resolves #85
Teemu Toivola [Fri, 9 Feb 2018 23:03:28 +0000 (01:03 +0200)]
add optional parameter to --oneline output for forcing fields to output in bytes
Teemu Toivola [Fri, 9 Feb 2018 22:33:10 +0000 (00:33 +0200)]
avoid possible division by zero
Teemu Toivola [Wed, 7 Feb 2018 21:19:23 +0000 (23:19 +0200)]
add task duration measurement for debug purposes
Teemu Toivola [Mon, 5 Feb 2018 22:44:26 +0000 (00:44 +0200)]
flush data from cache to database using one transaction, this results in a significant reduction in disk i/o especially when monitoring multiple interfaces
Teemu Toivola [Mon, 5 Feb 2018 21:32:03 +0000 (23:32 +0200)]
improve errorstring handling with timestamp, fix legacy database import usage when --alwaysadd was used, don't always try to open database in rw mode when write access isn't needed, add base for longer transactions
Teemu Toivola [Tue, 30 Jan 2018 20:43:42 +0000 (22:43 +0200)]
avoid monitoring and storing information of interfaces that don't produce any data
Teemu Toivola [Tue, 30 Jan 2018 19:21:27 +0000 (21:21 +0200)]
remove line changes from log prints
Teemu Toivola [Tue, 30 Jan 2018 19:16:27 +0000 (21:16 +0200)]
--daemon + --debug isn't a supported combination
Teemu Toivola [Tue, 30 Jan 2018 18:58:32 +0000 (20:58 +0200)]
improve daemon logging
Teemu Toivola [Sat, 27 Jan 2018 23:42:00 +0000 (01:42 +0200)]
add pebibyte support
Teemu Toivola [Sat, 27 Jan 2018 23:22:34 +0000 (01:22 +0200)]
remove hardcoded values from unit conversions
Teemu Toivola [Sat, 27 Jan 2018 22:47:22 +0000 (00:47 +0200)]
bump version from alpha to beta, update README.md, fix vnstati help output
Teemu Toivola [Sat, 27 Jan 2018 21:57:46 +0000 (23:57 +0200)]
implement summary image outputs, remove support of old style (default in versions up to 1.7) summary image layout
Teemu Toivola [Fri, 26 Jan 2018 21:38:27 +0000 (23:38 +0200)]
yet another fix for hourly image rate scaling, this time for getting the axis numbers to be nice and even
Teemu Toivola [Sat, 20 Jan 2018 17:24:26 +0000 (19:24 +0200)]
reorder includes to fix errors with old compilers in uint64_t handling
Teemu Toivola [Sat, 20 Jan 2018 16:56:19 +0000 (18:56 +0200)]
fix hourly image rate unit scaling, improve test coverage
Teemu Toivola [Tue, 16 Jan 2018 21:37:54 +0000 (23:37 +0200)]
implement hourly image output and improve image output test coverage
Teemu Toivola [Fri, 12 Jan 2018 21:44:55 +0000 (23:44 +0200)]
suppress output of tests generating output even when passing
Teemu Toivola [Fri, 12 Jan 2018 21:20:55 +0000 (23:20 +0200)]
image output also needs tests
Teemu Toivola [Wed, 10 Jan 2018 20:09:50 +0000 (22:09 +0200)]
improve cfg test coverage, related to #84
Teemu Toivola [Tue, 9 Jan 2018 22:00:00 +0000 (00:00 +0200)]
add support for negative numbers to setcfgvalue(), fixes #84
Teemu Toivola [Sun, 7 Jan 2018 20:32:24 +0000 (22:32 +0200)]
error print cleanup
Teemu Toivola [Sun, 7 Jan 2018 17:39:52 +0000 (19:39 +0200)]
2017 -> 2018
Teemu Toivola [Sun, 7 Jan 2018 17:38:13 +0000 (19:38 +0200)]
error handling improvements in vnstat
Teemu Toivola [Sun, 7 Jan 2018 14:45:51 +0000 (16:45 +0200)]
update README.md
Teemu Toivola [Sun, 7 Jan 2018 14:18:54 +0000 (16:18 +0200)]
fix warnings, increase size of errorstring to fix file paths without truncation
Teemu Toivola [Sun, 7 Jan 2018 14:01:54 +0000 (16:01 +0200)]
remove checks for SQLITE_NOTICE and SQLITE_WARNING to improve support for older sqlite releases, these result codes are only used by sqlite3_log() which doesn't get invoked
Teemu Toivola [Sun, 7 Jan 2018 01:23:23 +0000 (03:23 +0200)]
fix warnings
Teemu Toivola [Sat, 6 Jan 2018 23:44:50 +0000 (01:44 +0200)]
improve logging and handling of possible database errors
Teemu Toivola [Thu, 4 Jan 2018 21:00:08 +0000 (23:00 +0200)]
reopen database after starting daemon when forking is used, fixes #82
Christian Göttsche [Fri, 3 Nov 2017 09:02:07 +0000 (10:02 +0100)]
vnstat.service: add hardening and auto restart
Teemu Toivola [Mon, 9 Oct 2017 20:28:01 +0000 (23:28 +0300)]
update Travis CI configuration
Teemu Toivola [Mon, 9 Oct 2017 20:22:52 +0000 (23:22 +0300)]
Merge pull request #79 from vergoh/travis_fix
Fix Travis CI usage
Teemu Toivola [Mon, 9 Oct 2017 20:18:58 +0000 (23:18 +0300)]
disable osx testing in Travis due to environment issues (brew + ruby)
Teemu Toivola [Mon, 9 Oct 2017 19:47:53 +0000 (22:47 +0300)]
switch Travis execution environment
Teemu Toivola [Mon, 9 Oct 2017 19:33:21 +0000 (22:33 +0300)]
update Travis CI configuration
Teemu Toivola [Mon, 9 Oct 2017 18:39:37 +0000 (21:39 +0300)]
Merge pull request #76 from cgzones/coverity
fix issues found by coverity
Teemu Toivola [Mon, 9 Oct 2017 18:30:15 +0000 (21:30 +0300)]
Merge pull request #73 from hub2git/patch-1
Update INSTALL
Teemu Toivola [Mon, 9 Oct 2017 18:29:25 +0000 (21:29 +0300)]
Merge branch 'sqldb' into patch-1
Teemu Toivola [Mon, 9 Oct 2017 18:27:14 +0000 (21:27 +0300)]
Merge pull request #74 from hub2git/patch-2
Update INSTALL
Teemu Toivola [Mon, 9 Oct 2017 18:26:14 +0000 (21:26 +0300)]
Merge pull request #75 from hub2git/patch-3
Update README.md
Teemu Toivola [Mon, 9 Oct 2017 18:21:07 +0000 (21:21 +0300)]
Merge pull request #70 from cgzones/debian
Misspellings and compiler warnings
Teemu Toivola [Mon, 9 Oct 2017 18:12:59 +0000 (21:12 +0300)]
Merge pull request #63 from iamatacos/patch-1
Small modif to the man of vnstat.config
Christian Göttsche [Fri, 6 Oct 2017 10:55:39 +0000 (12:55 +0200)]
vnstat.service: add alias `vnstatd.service`
Christian Göttsche [Tue, 5 Sep 2017 09:23:17 +0000 (11:23 +0200)]
fix Time of check time of use issues
Found by coverity
Christian Göttsche [Tue, 5 Sep 2017 09:44:30 +0000 (11:44 +0200)]
check number of items read by fread()
Also check the filestream with ferror()
Found by coverity
Christian Göttsche [Tue, 5 Sep 2017 09:07:01 +0000 (11:07 +0200)]
fix resource leak
The file descriptor used for dup'ing stdout and stderr is not closed.
Found by coverity
Christian Göttsche [Tue, 5 Sep 2017 09:01:41 +0000 (11:01 +0200)]
fix possible not null-terminated string
fread() might not null-terminate strings when a broken database is read.
Found by covertity
hub2git [Sat, 2 Sep 2017 08:13:17 +0000 (01:13 -0700)]
Update README.md
Just a few tweaks.
hub2git [Sat, 2 Sep 2017 08:09:40 +0000 (01:09 -0700)]
Update INSTALL
minor typo
"Login" is the noun. "Log in" is the verb.
hub2git [Sat, 2 Sep 2017 08:05:08 +0000 (01:05 -0700)]
Update INSTALL
Minor typo
Christian Göttsche [Thu, 24 Aug 2017 17:44:18 +0000 (19:44 +0200)]
fix additional compiler warnings
Wformat-truncation
Wimplicit-declaration of wcswidth() on kFreeBSD
Wdiscard-qualifiers
Christian Göttsche [Sun, 20 Aug 2017 11:49:51 +0000 (13:49 +0200)]
Fx misc compiler warnings
src/vnstat.h:7:33: warning: identifier ‘delete’ conflicts with C++ keyword [-Wc++-compat]
src/ifinfo.c:61:13: warning: request for implicit conversion from ‘void *’ to ‘char *’ not permitted in C++ [-Wc++-compat]
src/dbxml.c:110:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
src/dbjson.c:134:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
src/common.c:270:6: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn]
src/misc.c:309:32: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
src/ibw.c:34:5: warning: request for implicit conversion from ‘void *’ to ‘ibwnode * {aka struct ibwnode *}’ not permitted in C++ [-Wc++-compat]
src/image.c:68:17: warning: passing argument 1 of ‘colorinitcheck’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
src/dbcache.c:26:4: warning: request for implicit conversion from ‘void *’ to ‘datanode * {aka struct datanode *}’ not permitted in C++ [-Wc++-compat]
src/ifinfo.c:358:4: warning: unsuffixed float constant [-Wunsuffixed-float-constants]
src/common.c:173:14: warning: nested extern declaration of ‘timezone’ [-Wnested-externs]
src/common.c:173:14: warning: redundant redeclaration of ‘timezone’ [-Wredundant-decls]
Christian Göttsche [Sun, 20 Aug 2017 11:49:19 +0000 (13:49 +0200)]
Spelling fixes
found by Debian's lintian
ALJI Mohamed [Sun, 25 Jun 2017 07:59:10 +0000 (07:59 +0000)]
Small modif to the man of vnstat.config