]> granicus.if.org Git - vnstat/commitdiff
rename configuration option WriteAheadLoggingDatabase -> DatabaseWriteAheadLogging...
authorTeemu Toivola <git@humdi.net>
Mon, 13 May 2019 17:46:15 +0000 (20:46 +0300)
committerTeemu Toivola <git@humdi.net>
Mon, 13 May 2019 17:46:15 +0000 (20:46 +0300)
CHANGES
UPGRADE.md
cfg/vnstat.conf
man/vnstat.conf.5
src/cfg.c
src/cfgoutput.c
src/vnstatd.c

diff --git a/CHANGES b/CHANGES
index 4e47643480bd154ca8d5c844e7033dc83b5e5263..87454de46926dfe21549a603cf7670fb96cf38c2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,7 +7,7 @@
      if the used systemd version supported ProtectSystem=strict but didn't
      support StateDirectory (issue seen at least with systemd 232 in Debian 9)
  - New
-   - Add configuration option WriteAheadLoggingDatabase to enable SQLite
+   - Add configuration option DatabaseWriteAheadLogging to enable SQLite
      Write-Ahead Logging mode which may provide some disk i/o benefits,
      see https://www.sqlite.org/wal.html for more details and note that
      SQLite 3.22.0 or later is required to support read-only operations
index c4448db68cac11aba7a5d0469b73b166e888ada0..df3c373ec9855057d184fdf0e581d21a51b84b94 100644 (file)
@@ -1,7 +1,7 @@
 
 # New configuration settings
 
- * 2.3: WriteAheadLoggingDatabase, DatabaseSynchronous
+ * 2.3: DatabaseWriteAheadLogging, DatabaseSynchronous
 
  * 2.2: 64bitInterfaceCounters
 
index 72bd8bc3ca08190778c4a084e22502703ec2f0fd..224d71560a4ba63d66fa50bff23caa3616a80935 100644 (file)
@@ -149,7 +149,7 @@ PidFile "/var/run/vnstat/vnstat.pid"
 64bitInterfaceCounters -2
 
 # use SQLite Write-Ahead Logging mode (1 = enabled, 0 = disabled)
-WriteAheadLoggingDatabase 0
+DatabaseWriteAheadLogging 0
 
 # change the setting of the SQLite "synchronous" flag
 # (-1 = auto, 0 = off, 1, = normal, 2 = full, 3 = extra)
index 50f5ec418fec4eb8690ac26bccf9ea272adabbe5..5f05985f5b88abf18ee1ec4f68ec5824bf45a8fe 100644 (file)
@@ -220,10 +220,16 @@ the database before continuing other actions. Higher values take extra steps
 to ensure data safety at the cost of slower performance. A value of 0 will
 result in all handling being left to the filesystem itself. Set to -1 to
 select the default value according to database mode controlled by
-.B WriteAheadLoggingDatabase
+.B DatabaseWriteAheadLogging
 setting. See SQLite documentation for more details regarding values from 1
 to 3. Value range: -1..3
 
+.TP
+.B DatabaseWriteAheadLogging
+Enable or disable SQLite Write-Ahead Logging mode for the database. See SQLite
+documentation for more details and note that support for read-only operations
+isn't available in older versions. 1 = enabled, 0 = disabled.
+
 .TP
 .B HourlyDays
 Data retention duration for the one hour resolution entries. The configuration
@@ -348,12 +354,6 @@ defines for how many past years entries will be stored. Set to -1 for
 unlimited entries or to 0 to disable the data collection of this
 resolution.
 
-.TP
-.B WriteAheadLoggingDatabase
-Enable or disable SQLite Write-Ahead Logging mode for the database. See SQLite
-documentation for more details and note that support for read-only operations
-isn't available in older versions. 1 = enabled, 0 = disabled.
-
 .SH IMAGE OUTPUT RELATED KEYWORDS
 
 .TP
index 9a4d16132e3e50ee3ef55ed64a62e5c48f299379..1a8ac167befc6d3563897767834885f0e864d81d 100644 (file)
--- a/src/cfg.c
+++ b/src/cfg.c
@@ -64,7 +64,7 @@ int loadcfg(const char *cfgfile)
                 {"LogFile", cfg.logfile, 0, 512, 0},
                 {"PidFile", cfg.pidfile, 0, 512, 0},
                 {"64bitInterfaceCounters", 0, &cfg.is64bit, 0, 0},
-                {"WriteAheadLoggingDatabase", 0, &cfg.waldb, 0, 0},
+                {"DatabaseWriteAheadLogging", 0, &cfg.waldb, 0, 0},
                 {"DatabaseSynchronous", 0, &cfg.dbsynchronous, 0, 0},
                 {"HeaderFormat", cfg.hformat, 0, 64, 0},
                 {"HourlyRate", 0, &cfg.hourlyrate, 0, 0},
@@ -192,7 +192,7 @@ void validatecfg(void)
        validateint("CreateDirs", &cfg.createdirs, CREATEDIRS, 0, 2);
        validateint("UpdateFileOwner", &cfg.updatefileowner, UPDATEFILEOWNER, 0, 2);
        validateint("64bitInterfaceCounters", &cfg.is64bit, IS64BIT, -2, 1);
-       validatebool("WriteAheadLoggingDatabase", &cfg.waldb, WALDB);
+       validatebool("DatabaseWriteAheadLogging", &cfg.waldb, WALDB);
        validateint("DatabaseSynchronous", &cfg.dbsynchronous, DBSYNCHRONOUS, -1, 3);
        validatebool("TransparentBg", &cfg.transbg, TRANSBG);
        validatebool("HourlyRate", &cfg.hourlyrate, HOURLYRATE);
index e6dce2ae257093ad5b21057c7e1f3ae945ef6687..ad68225b731c8d0965538e84c957d1c4050a85ac 100644 (file)
@@ -164,7 +164,7 @@ void printcfgfile(void)
        printf("64bitInterfaceCounters %d\n\n", cfg.is64bit);
 
        printf("# use SQLite Write-Ahead Logging mode (1 = enabled, 0 = disabled)\n");
-       printf("WriteAheadLoggingDatabase %d\n\n", cfg.waldb);
+       printf("DatabaseWriteAheadLogging %d\n\n", cfg.waldb);
 
        printf("# change the setting of the SQLite \"synchronous\" flag\n");
        printf("# (-1 = auto, 0 = off, 1, = normal, 2 = full, 3 = extra)\n");
index b2451d555c45bef136cc570c097552e9bf07fffd..cbf65dab0e81d9f02e4f711f8a4bf5df24dfd919 100644 (file)
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
 
 #if !HAVE_DECL_SQLITE_CHECKPOINT_RESTART
        if (cfg.waldb) {
-               snprintf(errorstring, 1024, "WriteAheadLoggingDatabase is enabled but used libsqlite3 does not support it");
+               snprintf(errorstring, 1024, "DatabaseWriteAheadLogging is enabled but used libsqlite3 does not support it");
                printe(PT_Warning);
        }
 #endif