mdbx: minor refine man-files.

This commit is contained in:
Leonid Yuriev 2019-12-05 01:43:57 +03:00
parent ab5f3bc444
commit 3dccbb25a7
8 changed files with 88 additions and 52 deletions

View File

@ -1,6 +1,6 @@
.\" Copyright 2015-2019 Leonid Yuriev <leo@yuriev.ru>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDBX_CHK 1 "2019-09-10" "MDBX 0.x"
.TH MDBX_CHK 1 "2019-12-05" "MDBX 0.4.x"
.SH NAME
mdbx_chk \- MDBX checking tool
.SH SYNOPSIS
@ -14,16 +14,16 @@ mdbx_chk \- MDBX checking tool
[\c
.BR \-q ]
[\c
.BR \-c ]
[\c
.BR \-w ]
[\c
.BR \-d ]
[\c
.BI \-s \ subdb\fR]
[\c
.BR \-c ]
[\c
.BR \-i ]
.BR \ envpath
[\c
.BI \-s \ subdb\fR]
.BR \ dbpath
.SH DESCRIPTION
The
.B mdbx_chk
@ -50,6 +50,11 @@ Open MDBX environment(s) which do not use subdirectories.
.BR \-q
Be quiet; do not output anything even if an error was detected.
.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 \-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)
@ -63,17 +68,12 @@ 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.
.TP
.BR \-s \ subdb
Verify and show info only for a specific subdatabase.
.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

View File

@ -2,7 +2,7 @@
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDBX_COPY 1 "2019-09-10" "MDBX 0.x"
.TH MDBX_COPY 1 "2019-12-05" "MDBX 0.4.x"
.SH NAME
mdbx_copy \- MDBX environment copy tool
.SH SYNOPSIS
@ -10,12 +10,14 @@ mdbx_copy \- MDBX environment copy tool
[\c
.BR \-V ]
[\c
.BR \-q ]
[\c
.BR \-c ]
[\c
.BR \-n ]
.B srcpath
.B src_path
[\c
.BR dstpath ]
.BR dest_path ]
.SH DESCRIPTION
The
.B mdbx_copy
@ -24,7 +26,7 @@ be copied regardless of whether it is currently in use.
No lockfile is created, since it gets recreated at need.
If
.I dstpath
.I dest_path
is specified it must be the path of an empty directory
for storing the backup. Otherwise, the backup will be
written to stdout.
@ -34,6 +36,9 @@ written to stdout.
.BR \-V
Write the library version number to the standard output, and exit.
.TP
.BR \-q
Be quiet.
.TP
.BR \-c
Compact while copying. Only current data pages will be copied; freed
or unused pages will be omitted from the copy. This option will
@ -57,4 +62,5 @@ free during copying cannot be reused until the copy is done.
.BR mdbx_stat (1),
.BR mdbx_load (1)
.SH AUTHOR
Howard Chu of Symas Corporation <http://www.symas.com>
Howard Chu of Symas Corporation <http://www.symas.com>,
Leonid Yuriev <https://github.com/leo-yuriev>

View File

@ -2,7 +2,7 @@
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDBX_DUMP 1 "2019-09-10" "MDBX 0.x"
.TH MDBX_DUMP 1 "2019-12-05" "MDBX 0.4.x"
.SH NAME
mdbx_dump \- MDBX environment export tool
.SH SYNOPSIS
@ -10,17 +10,21 @@ mdbx_dump \- MDBX environment export tool
[\c
.BR \-V ]
[\c
.BR \-q ]
[\c
.BI \-f \ file\fR]
[\c
.BR \-l ]
[\c
.BR \-n ]
[\c
.BR \-p ]
[\c
.BR \-a \ |
.BI \-s \ subdb\fR]
.BR \ envpath
[\c
.BR \-r ]
[\c
.BR \-n ]
.BR \ dbpath
.SH DESCRIPTION
The
.B mdbx_dump
@ -34,6 +38,9 @@ utility.
.BR \-V
Write the library version number to the standard output, and exit.
.TP
.BR \-q
Be quiet.
.TP
.BR \-f \ file
Write to the specified file instead of to the standard output.
.TP
@ -41,9 +48,6 @@ Write to the specified file instead of to the standard output.
List the databases stored in the environment. Just the
names will be listed, no data will be output.
.TP
.BR \-n
Dump an MDBX database which does not use subdirectories.
.TP
.BR \-p
If characters in either the key or data items are printing characters (as
defined by isprint(3)), output them directly. This option permits users to
@ -58,6 +62,12 @@ Dump all of the subdatabases in the environment.
.TP
.BR \-s \ subdb
Dump a specific subdatabase. If no database is specified, only the main database is dumped.
.TP
.BR \-r
Rescure mode. Ignore some errors to dump corrupted DB.
.TP
.BR \-n
Dump an MDBX database which does not use subdirectories.
.SH DIAGNOSTICS
Exit status is zero if no errors occur.
Errors result in a non-zero exit status and
@ -77,4 +87,5 @@ utility to load the database using the correct comparison functions.
.BR mdbx_chk (1),
.BR mdbx_stat (1)
.SH AUTHOR
Howard Chu of Symas Corporation <http://www.symas.com>
Howard Chu of Symas Corporation <http://www.symas.com>,
Leonid Yuriev <https://github.com/leo-yuriev>

View File

@ -2,7 +2,7 @@
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDBX_LOAD 1 "2019-09-10" "MDBX 0.x"
.TH MDBX_LOAD 1 "2019-12-05" "MDBX 0.4.x"
.SH NAME
mdbx_load \- MDBX environment import tool
.SH SYNOPSIS
@ -10,22 +10,28 @@ mdbx_load \- MDBX environment import tool
[\c
.BR \-V ]
[\c
.BI \-f \ file\fR]
.BR \-q ]
[\c
.BR \-n ]
.BR \-a ]
[\c
.BI \-f \ file\fR]
[\c
.BI \-s \ subdb\fR]
[\c
.BR \-N ]
[\c
.BR \-T ]
.BR \ envpath
[\c
.BR \-r ]
[\c
.BR \-n ]
.BR \ dbpath
.SH DESCRIPTION
The
.B mdbx_load
utility reads from the standard input and loads it into the
MDBX environment
.BR envpath .
.BR dbpath .
The input to
.B mdbx_load
@ -39,6 +45,9 @@ option below.
.BR \-V
Write the library version number to the standard output, and exit.
.TP
.BR \-q
Be quiet.
.TP
.BR \-a
Append all records in the order they appear in the input. The input is assumed to already be
in correctly sorted order and no sorting or checking for redundant values will be performed.
@ -49,9 +58,6 @@ on a database that uses custom compare functions.
.BR \-f \ file
Read from the specified file instead of from the standard input.
.TP
.BR \-n
Load an MDBX database which does not use subdirectories.
.TP
.BR \-s \ subdb
Load a specific subdatabase. If no database is specified, data is loaded into the main database.
.TP
@ -62,6 +68,12 @@ Don't overwrite existing records when loading into an already existing database;
Load data from simple text files. The input must be paired lines of text, where the first
line of the pair is the key item, and the second line of the pair is its corresponding
data item.
.TP
.BR \-r
Rescure mode. Ignore errors to load corrupted DB dump.
.TP
.BR \-n
Load an MDBX database which does not use subdirectories.
A simple escape mechanism, where newline and backslash (\\) characters are special, is
applied to the text input. Newline characters are interpreted as record separators.
@ -86,4 +98,5 @@ a diagnostic message being written to standard error.
.BR mdbx_stat (1),
.BR mdbx_copy (1)
.SH AUTHOR
Howard Chu of Symas Corporation <http://www.symas.com>
Howard Chu of Symas Corporation <http://www.symas.com>,
Leonid Yuriev <https://github.com/leo-yuriev>

View File

@ -2,7 +2,7 @@
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.TH MDBX_STAT 1 "2019-09-10" "MDBX 0.x"
.TH MDBX_STAT 1 "2019-12-05" "MDBX 0.4.x"
.SH NAME
mdbx_stat \- MDBX environment status tool
.SH SYNOPSIS
@ -10,17 +10,19 @@ mdbx_stat \- MDBX environment status tool
[\c
.BR \-V ]
[\c
.BR \-q ]
[\c
.BR \-e ]
[\c
.BR \-f [ f [ f ]]]
[\c
.BR \-n ]
[\c
.BR \-r [ r ]]
[\c
.BR \-a \ |
.BI \-s \ subdb\fR]
.BR \ envpath
.BR \ dbpath
[\c
.BR \-n ]
.SH DESCRIPTION
The
.B mdbx_stat
@ -30,6 +32,9 @@ utility displays the status of an MDBX environment.
.BR \-V
Write the library version number to the standard output, and exit.
.TP
.BR \-q
Be quiet.
.TP
.BR \-e
Display information about the database environment.
.TP
@ -38,9 +43,6 @@ Display information about the environment freelist.
If \fB\-ff\fP is given, summarize each freelist entry.
If \fB\-fff\fP is given, display the full list of page IDs in the freelist.
.TP
.BR \-n
Display the status of an MDBX database which does not use subdirectories.
.TP
.BR \-r
Display information about the environment reader table.
Shows the process ID, thread ID, and transaction ID for each active
@ -56,6 +58,9 @@ Display the status of all of the subdatabases in the environment.
.TP
.BR \-s \ subdb
Display the status of a specific subdatabase.
.TP
.BR \-n
Display the status of an MDBX database which does not use subdirectories.
.SH DIAGNOSTICS
Exit status is zero if no errors occur.
Errors result in a non-zero exit status and
@ -66,4 +71,5 @@ a diagnostic message being written to standard error.
.BR mdbx_dump (1),
.BR mdbx_load (1)
.SH AUTHOR
Howard Chu of Symas Corporation <http://www.symas.com>
Howard Chu of Symas Corporation <http://www.symas.com>,
Leonid Yuriev <https://github.com/leo-yuriev>

View File

@ -759,16 +759,16 @@ bailout:
static void usage(char *prog) {
fprintf(stderr,
"usage: %s [-V] [-v] [-n] [-q] [-w] [-c] [-d] [-s subdb] dbpath\n"
"usage: %s [-V] [-v] [-n] [-q] [-c] [-w] [-d] [-i] [-s subdb] dbpath\n"
" -V\t\tprint version and exit\n"
" -v\t\tmore verbose, could be used multiple times\n"
" -n\t\tNOSUBDIR mode for open\n"
" -q\t\tbe quiet\n"
" -c\t\tforce cooperative mode (don't try exclusive)\n"
" -w\t\tlock DB for writing while checking\n"
" -d\t\tdisable page-by-page traversal of B-tree\n"
" -s subdb\tprocess a specific subdatabase only\n"
" -c\t\tforce cooperative mode (don't try exclusive)\n"
" -i\t\tignore wrong order errors (for custom comparators case)\n",
" -i\t\tignore wrong order errors (for custom comparators case)\n"
" -s subdb\tprocess a specific subdatabase only\n",
prog);
exit(EXIT_INTERRUPTED);
}

View File

@ -160,7 +160,7 @@ static int dumpit(MDBX_txn *txn, MDBX_dbi dbi, char *name) {
static void usage(char *prog) {
fprintf(stderr,
"usage: %s [-V] [-q] [-f output] [-l] [-p] [-a|-s subdb] [-r] [-n] "
"usage: %s [-V] [-q] [-f file] [-l] [-p] [-a|-s subdb] [-r] [-n] "
"dbpath\n"
" -V\t\tprint version and exit\n"
" -q\t\tbe quiet\n"

View File

@ -54,14 +54,14 @@ static void prstat(MDBX_stat *ms) {
static void usage(char *prog) {
fprintf(stderr,
"usage: %s [-V] [-e] [-r[r]] [-f[f[f]]] [-a|-s name] [-n] dbpath\n"
"usage: %s [-V] [-e] [-f[f[f]]] [-r[r]] [-a|-s name] [-n] dbpath\n"
" -V\t\tprint version and exit\n"
" -a\t\tprint stat of main DB and all subDBs\n"
" -s name\tprint stat of only the named subDB\n"
" -e\t\tshow whole DB info\n"
" -f\t\tshow GC info\n"
" -r\t\tshow readers\n"
" -a\t\tprint stat of main DB and all subDBs\n"
" \t\t(default) print stat of only the main DB\n"
" -s name\tprint stat of only the named subDB\n"
" -n\t\tNOSUBDIR mode for open\n",
prog);
exit(EXIT_FAILURE);