diff --git a/GNUmakefile b/GNUmakefile index 63d8306b..a8c99777 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -44,7 +44,7 @@ SO_SUFFIX := $(shell $(uname2sosuffix)) HEADERS := mdbx.h LIBRARIES := libmdbx.a libmdbx.$(SO_SUFFIX) TOOLS := mdbx_stat mdbx_copy mdbx_dump mdbx_load mdbx_chk -MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1 +MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1 mdbx_chk.1 .PHONY: mdbx all install clean check coverage diff --git a/src/tools/mdbx_chk.1 b/src/tools/mdbx_chk.1 new file mode 100644 index 00000000..84b10a1f --- /dev/null +++ b/src/tools/mdbx_chk.1 @@ -0,0 +1,87 @@ +.\" Copyright 2015-2019 Leonid Yuriev . +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_CHK 1 "2019-09-10" "MDBX 0.x" +.SH NAME +mdbx_chk \- MDBX checking tool +.SH SYNOPSIS +.B mdbx_chk +[\c +.BR \-V ] +[\c +.BR \-v [ v [ v ]]] +[\c +.BR \-n ] +[\c +.BR \-q ] +[\c +.BR \-w ] +[\c +.BR \-d ] +[\c +.BI \-s \ subdb\fR] +[\c +.BR \-c ] +[\c +.BR \-i ] +.BR \ envpath +.SH DESCRIPTION +The +.B mdbx_chk +utility intended to check an MDBX database file. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-v +Produce verbose output, including summarize space and page usage statistics. +If \fB\-vv\fP is given, be more verbose, show summarized B-tree info +and space allocation. +If \fB\-vvv\fP is given, be more verbose, include summarized statistics +of leaf B-tree pages. +If \fB\-vvvv\fP is given, be even more verbose, show info of each page +during B-tree traversal and basic info of each GC record. +If \fB\-vvvvv\fP is given, turn maximal verbosity, display the full list +of page IDs in the GC records and size of each key-value pair of database(s). +.TP +.BR \-n +Open MDBX environment(s) which do not use subdirectories. +.TP +.BR \-q +Be quiet; do not output anything even if an error was detected. +.TP +.BR \-w +Open environment in read-write mode and lock for writing while checking. +This could be impossible if environment already used by another process(s) +in an incompatible read-write mode. This allow rollback to last steady commit +(in case environment was not closed properly) and then check transaction IDs +of meta-pages. Otherwise, without \fB\-w\fP option environment will be +opened in read-only mode. +.TP +.BR \-d +Disable page-by-page traversal of B-tree. In this case, without B-tree +traversal, it is unable to check for lost-unused pages nor for double-used +pages. +.TP +.BR \-s \ subdb +Verify and show info only for a specific subdatabase. +.TP +.BR \-c +Force using cooperative mode while opening environment, i.e. don't try to open +in exclusive/monopolistic mode. Only exclusive/monopolistic mode allow complete +check, including full check of all meta-pages and actual size of database file. +.TP +.BR \-i +Ignore wrong order errors, which will likely false-positive if custom +comparator(s) was used. +.SH DIAGNOSTICS +Exit status is zero if no errors occur. Errors result in a non-zero exit status +and a diagnostic message being written to standard error +if no quiet mode was requested. +.SH "SEE ALSO" +.BR mdbx_stat (1), +.BR mdbx_copy (1), +.BR mdbx_dump (1), +.BR mdbx_load (1) +.SH AUTHOR +Leonid Yuriev diff --git a/src/tools/mdbx_copy.1 b/src/tools/mdbx_copy.1 index 74d94b6b..08717bca 100644 --- a/src/tools/mdbx_copy.1 +++ b/src/tools/mdbx_copy.1 @@ -2,7 +2,7 @@ .\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. .\" Copyright 2015,2016 Peter-Service R&D LLC . .\" Copying restrictions apply. See COPYRIGHT/LICENSE. -.TH MDBX_COPY 1 "2014/06/20" "LMDB 0.9.14" +.TH MDBX_COPY 1 "2019-09-10" "MDBX 0.x" .SH NAME mdbx_copy \- MDBX environment copy tool .SH SYNOPSIS @@ -41,7 +41,7 @@ slow down the backup process as it is more CPU-intensive. Currently it fails if the environment has suffered a page leak. .TP .BR \-n -Open LDMB environment(s) which do not use subdirectories. +Open MDBX environment(s) which do not use subdirectories. .SH DIAGNOSTICS Exit status is zero if no errors occur. @@ -52,6 +52,9 @@ This utility can trigger significant file size growth if run in parallel with write transactions, because pages which they free during copying cannot be reused until the copy is done. .SH "SEE ALSO" -.BR mdbx_stat (1) +.BR mdbx_dump (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1), +.BR mdbx_load (1) .SH AUTHOR Howard Chu of Symas Corporation diff --git a/src/tools/mdbx_dump.1 b/src/tools/mdbx_dump.1 index 93d29a7c..0e5ecf66 100644 --- a/src/tools/mdbx_dump.1 +++ b/src/tools/mdbx_dump.1 @@ -2,7 +2,7 @@ .\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. .\" Copyright 2015,2016 Peter-Service R&D LLC . .\" Copying restrictions apply. See COPYRIGHT/LICENSE. -.TH MDBX_DUMP 1 "2014/06/20" "LMDB 0.9.14" +.TH MDBX_DUMP 1 "2019-09-10" "MDBX 0.x" .SH NAME mdbx_dump \- MDBX environment export tool .SH SYNOPSIS @@ -72,6 +72,9 @@ The only available workaround is to modify the source for the .BR mdbx_load (1) utility to load the database using the correct comparison functions. .SH "SEE ALSO" -.BR mdbx_load (1) +.BR mdbx_load (1), +.BR mdbx_copy (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1) .SH AUTHOR Howard Chu of Symas Corporation diff --git a/src/tools/mdbx_load.1 b/src/tools/mdbx_load.1 index e23ec78e..01b03eff 100644 --- a/src/tools/mdbx_load.1 +++ b/src/tools/mdbx_load.1 @@ -2,7 +2,7 @@ .\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. .\" Copyright 2015,2016 Peter-Service R&D LLC . .\" Copying restrictions apply. See COPYRIGHT/LICENSE. -.TH MDBX_LOAD 1 "2014/06/20" "LMDB 0.9.14" +.TH MDBX_LOAD 1 "2019-09-10" "MDBX 0.x" .SH NAME mdbx_load \- MDBX environment import tool .SH SYNOPSIS @@ -81,6 +81,9 @@ Errors result in a non-zero exit status and a diagnostic message being written to standard error. .SH "SEE ALSO" -.BR mdbx_dump (1) +.BR mdbx_dump (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1), +.BR mdbx_copy (1) .SH AUTHOR Howard Chu of Symas Corporation diff --git a/src/tools/mdbx_stat.1 b/src/tools/mdbx_stat.1 index 50a30b4f..424e76c0 100644 --- a/src/tools/mdbx_stat.1 +++ b/src/tools/mdbx_stat.1 @@ -2,7 +2,7 @@ .\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. .\" Copyright 2015,2016 Peter-Service R&D LLC . .\" Copying restrictions apply. See COPYRIGHT/LICENSE. -.TH MDBX_STAT 1 "2014/06/20" "LMDB 0.9.14" +.TH MDBX_STAT 1 "2019-09-10" "MDBX 0.x" .SH NAME mdbx_stat \- MDBX environment status tool .SH SYNOPSIS @@ -61,6 +61,9 @@ Exit status is zero if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. .SH "SEE ALSO" -.BR mdbx_copy (1) +.BR mdbx_chk (1), +.BR mdbx_copy (1), +.BR mdbx_dump (1), +.BR mdbx_load (1) .SH AUTHOR Howard Chu of Symas Corporation