Skip to content

Commit 2926d05

Browse files
committed
CCBC-1598: fix documentation for cbc tools
Change-Id: I9cc9553541f3a5e757f36b386520129996852ffd Reviewed-on: https://review.couchbase.org/c/libcouchbase/+/218224 Reviewed-by: Michael Reiche <michael.reiche@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
1 parent 590f92b commit 2926d05

11 files changed

Lines changed: 711 additions & 1159 deletions

doc/cbc-n1qlback.markdown

Lines changed: 157 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,78 @@ The following options control workload generation:
4848

4949
The following options control how `cbc-n1qlback` connects to the cluster
5050

51-
@@common-options.markdown@@
51+
* `-U`, `--spec`=_SPEC_:
52+
A string describing the cluster to connect to. The string is in a URI-like syntax,
53+
and may also contain other options. See the [EXAMPLES](#examples) section for information.
54+
Typically such a URI will look like `couchbase://host1,host2,host3/bucket`.
55+
56+
The default for this option is `couchbase://localhost/default`
57+
58+
* `-u`, `--username`=_USERNAME_:
59+
Specify the _username_ for the bucket. Since Couchbase 5.x this is mandatory
60+
switch, and it must specify the name of the user exisiting on cluster (read
61+
more at "Security/Authorization" section of the server manual). For older servers
62+
this field should be either left empty or set to the name of the bucket itself.
63+
64+
* `-P`, `--password`=_PASSWORD_:
65+
* `-P -`, `--password=-`:
66+
Specify the password for the bucket. As for servers before 5.x this was only
67+
needed if the bucket is protected with a password. For cluster version after 5.x,
68+
the password is mandatory, and should match the selected account (read more at
69+
"Security/Authorization" section of the server manual).
70+
71+
Specifying the `-` as the password indicates that the program should prompt for the
72+
password. You may also specify the password on the commandline, directly,
73+
but is insecure as command line arguments are visible via commands such as `ps`.
74+
75+
* `-T`, `--timings`:
76+
Dump command timings at the end of execution. This will display a histogram
77+
showing the latencies for the commands executed.
78+
79+
* `-v`, `--verbose`:
80+
Specify more information to standard error about what the client is doing. You may
81+
specify this option multiple times for increased output detail.
82+
83+
* `-D`, `--cparam`=OPTION=VALUE:
84+
Provide additional client options. Acceptable options can also be placed
85+
in the connection string, however this option is provided as a convenience.
86+
This option may be specified multiple times, each time specifying a key=value
87+
pair (for example, `-Doperation_timeout=10 -Dconfig_cache=/foo/bar/baz`).
88+
See [ADDITIONAL OPTIONS](#additional-options) for more information
89+
90+
* `-y`, `--compress`:
91+
Enable compressing of documents. When the library is compiled with compression
92+
support, this option will enable Snappy compression for outgoing data.
93+
Incoming compressed data is handled automatically regardless of this option.
94+
Note, that because the compression support have to be negotiated with the
95+
server, first packets might be sent uncompressed even when this switch
96+
was specified. This is because the library might queue data commands before
97+
socket connection has been established, and the library will negotiate
98+
compression feature. If it is known that all server support compression
99+
repeating the switch (like `-yy`) will force compression for all outgoing
100+
mutations, even scheduled before establishing connection.
101+
102+
* `--truststorepath`=_PATH_:
103+
The path to the server's SSL certificate. This is typically required for SSL
104+
connectivity unless the certificate has already been added to the OpenSSL
105+
installation on the system (only applicable with `couchbases://` scheme)
106+
107+
* `--certpath`=_PATH_:
108+
The path to the server's SSL certificate. This is typically required for SSL
109+
connectivity unless the certificate has already been added to the OpenSSL
110+
installation on the system (only applicable with `couchbases://` scheme).
111+
This also should contain client certificate when certificate authentication
112+
used, and in this case other public certificates could be extracted into
113+
`truststorepath` chain.
114+
115+
* `--keypath`=_PATH_:
116+
The path to the client SSL private key. This is typically required for SSL
117+
client certificate authentication. The certificate itself have to go first
118+
in chain specified by `certpath` (only applicable with `couchbases://` scheme)
119+
120+
* `--dump`:
121+
Dump verbose internal state after operations are done.
122+
52123

53124
* `-e`, `--error-log`=_PATH_:
54125
Path to a file, where the command will write failed queries along with error details.
@@ -66,7 +137,91 @@ key=value pairs passed to the `-D` switch (e.g. `-Doption1=value1
66137
and is provided as a convenience for options to be easily passed on the
67138
command-line
68139

69-
@@common-additional-options.markdown@@
140+
* `operation_timeout=SECONDS`:
141+
Specify the operation timeout in seconds. This is the time the client will
142+
wait for an operation to complete before timing it out. The default is `2.5`
143+
* `config_cache=PATH`:
144+
Enables the client to make use of a file based configuration cache rather
145+
than connecting for the bootstrap operation. If the file does not exist, the
146+
client will first connect to the cluster and then cache the bootstrap information
147+
in the file.
148+
* `truststorepath=PATH`:
149+
The path to the server's SSL certificate. This is typically required for SSL
150+
connectivity unless the certificate has already been added to the OpenSSL
151+
installation on the system (only applicable with `couchbases://` scheme)
152+
* `certpath=PATH`:
153+
The path to the server's SSL certificate. This is typically required for SSL
154+
connectivity unless the certificate has already been added to the OpenSSL
155+
installation on the system (only applicable with `couchbases://` scheme).
156+
This also should contain client certificate when certificate authentication
157+
used, and in this case other public certificates could be extracted into
158+
`truststorepath` chain.
159+
* `keypath=PATH`:
160+
The path to the client SSL private key. This is typically required for SSL
161+
client certificate authentication. The certificate itself have to go first
162+
in chain specified by `certpath` (only applicable with `couchbases://` scheme)
163+
* `ipv6=allow`:
164+
Enable IPv6.
165+
* `ssl=no_verify`:
166+
Temporarily disable certificate verification for SSL (only applicable with
167+
`couchbases://` scheme). This should only be used for quickly debugging SSL
168+
functionality.
169+
* `sasl_mech_force=MECHANISM`:
170+
Force a specific _SASL_ mechanism to be used when performing the initial
171+
connection. This should only need to be modified for debugging purposes.
172+
The currently supported mechanisms are `PLAIN` and `CRAM-MD5`
173+
* `bootstrap_on=<both,http,cccp>`:
174+
Specify the bootstrap protocol the client should use when attempting to connect
175+
to the cluster. Options are: `cccp`: Bootstrap using the Memcached protocol
176+
(supported on clusters 2.5 and greater); `http`: Bootstrap using the HTTP REST
177+
protocol (supported on any cluster version); and `both`: First attempt bootstrap
178+
over the Memcached protocol, and use the HTTP protocol if Memcached bootstrap fails.
179+
The default is `both`
180+
181+
* `enable_tracing=true/false`: Activate/deactivate end-to-end tracing.
182+
183+
* `tracing_orphaned_queue_flush_interval=SECONDS`: Flush interval for orphaned
184+
spans queue in default tracer. This is the time the tracer will wait between
185+
repeated attempts to flush most recent orphaned spans.
186+
Default value is 10 seconds.
187+
188+
* `tracing_orphaned_queue_size=NUMBER`: Size of orphaned spans queue in default
189+
tracer. Queues in default tracer has fixed size, and it will remove
190+
information about older spans, when the limit will be reached before flushing
191+
time.
192+
Default value is 128.
193+
194+
* `tracing_threshold_queue_flush_interval=SECONDS`: Flush interval for spans
195+
with total time over threshold in default tracer. This is the time the tracer
196+
will wait between repeated attempts to flush threshold queue.
197+
Default value is 10 seconds.
198+
199+
* `tracing_threshold_queue_size=NUMBER`: Size of threshold queue in default
200+
tracer. Queues in default tracer has fixed size, and it will remove
201+
information about older spans, when the limit will be reached before flushing
202+
time.
203+
Default value is 128.
204+
205+
* `tracing_threshold_kv=SECONDS`: Minimum time for the tracing span of KV
206+
service to be considered by threshold tracer.
207+
Default value is 0.5 seconds.
208+
209+
* `tracing_threshold_query=SECONDS`: Minimum time for the tracing span of QUERY
210+
service to be considered by threshold tracer.
211+
Default value is 1 second.
212+
213+
* `tracing_threshold_view=SECONDS`: Minimum time for the tracing span of VIEW
214+
service to be considered by threshold tracer.
215+
Default value is 1 second.
216+
217+
* `tracing_threshold_search=SECONDS`: Minimum time for the tracing span of SEARCH
218+
service to be considered by threshold tracer.
219+
Default value is 1 second.
220+
221+
* `tracing_threshold_analytics=SECONDS`: Minimum time for the tracing span of
222+
ANALYTICS service to be considered by threshold tracer.
223+
Default value is 1 second.
224+
70225

71226
## EXAMPLES
72227

doc/cbc-pillowfight.markdown

Lines changed: 157 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,78 @@ The following options control workload generation:
127127
operation. Note that setting this too low may cause not-found errors to
128128
appear on the screen.
129129

130-
@@common-options.markdown@@
130+
* `-U`, `--spec`=_SPEC_:
131+
A string describing the cluster to connect to. The string is in a URI-like syntax,
132+
and may also contain other options. See the [EXAMPLES](#examples) section for information.
133+
Typically such a URI will look like `couchbase://host1,host2,host3/bucket`.
134+
135+
The default for this option is `couchbase://localhost/default`
136+
137+
* `-u`, `--username`=_USERNAME_:
138+
Specify the _username_ for the bucket. Since Couchbase 5.x this is mandatory
139+
switch, and it must specify the name of the user exisiting on cluster (read
140+
more at "Security/Authorization" section of the server manual). For older servers
141+
this field should be either left empty or set to the name of the bucket itself.
142+
143+
* `-P`, `--password`=_PASSWORD_:
144+
* `-P -`, `--password=-`:
145+
Specify the password for the bucket. As for servers before 5.x this was only
146+
needed if the bucket is protected with a password. For cluster version after 5.x,
147+
the password is mandatory, and should match the selected account (read more at
148+
"Security/Authorization" section of the server manual).
149+
150+
Specifying the `-` as the password indicates that the program should prompt for the
151+
password. You may also specify the password on the commandline, directly,
152+
but is insecure as command line arguments are visible via commands such as `ps`.
153+
154+
* `-T`, `--timings`:
155+
Dump command timings at the end of execution. This will display a histogram
156+
showing the latencies for the commands executed.
157+
158+
* `-v`, `--verbose`:
159+
Specify more information to standard error about what the client is doing. You may
160+
specify this option multiple times for increased output detail.
161+
162+
* `-D`, `--cparam`=OPTION=VALUE:
163+
Provide additional client options. Acceptable options can also be placed
164+
in the connection string, however this option is provided as a convenience.
165+
This option may be specified multiple times, each time specifying a key=value
166+
pair (for example, `-Doperation_timeout=10 -Dconfig_cache=/foo/bar/baz`).
167+
See [ADDITIONAL OPTIONS](#additional-options) for more information
168+
169+
* `-y`, `--compress`:
170+
Enable compressing of documents. When the library is compiled with compression
171+
support, this option will enable Snappy compression for outgoing data.
172+
Incoming compressed data is handled automatically regardless of this option.
173+
Note, that because the compression support have to be negotiated with the
174+
server, first packets might be sent uncompressed even when this switch
175+
was specified. This is because the library might queue data commands before
176+
socket connection has been established, and the library will negotiate
177+
compression feature. If it is known that all server support compression
178+
repeating the switch (like `-yy`) will force compression for all outgoing
179+
mutations, even scheduled before establishing connection.
180+
181+
* `--truststorepath`=_PATH_:
182+
The path to the server's SSL certificate. This is typically required for SSL
183+
connectivity unless the certificate has already been added to the OpenSSL
184+
installation on the system (only applicable with `couchbases://` scheme)
185+
186+
* `--certpath`=_PATH_:
187+
The path to the server's SSL certificate. This is typically required for SSL
188+
connectivity unless the certificate has already been added to the OpenSSL
189+
installation on the system (only applicable with `couchbases://` scheme).
190+
This also should contain client certificate when certificate authentication
191+
used, and in this case other public certificates could be extracted into
192+
`truststorepath` chain.
193+
194+
* `--keypath`=_PATH_:
195+
The path to the client SSL private key. This is typically required for SSL
196+
client certificate authentication. The certificate itself have to go first
197+
in chain specified by `certpath` (only applicable with `couchbases://` scheme)
198+
199+
* `--dump`:
200+
Dump verbose internal state after operations are done.
201+
131202

132203
* `d`, `--durability`=_LEVEL_:
133204
Specify durability level for mutation operations. Known values are: "none",
@@ -203,7 +274,91 @@ key=value pairs passed to the `-D` switch (e.g. `-Doption1=value1
203274
and is provided as a convenience for options to be easily passed on the
204275
command-line
205276

206-
@@common-additional-options.markdown@@
277+
* `operation_timeout=SECONDS`:
278+
Specify the operation timeout in seconds. This is the time the client will
279+
wait for an operation to complete before timing it out. The default is `2.5`
280+
* `config_cache=PATH`:
281+
Enables the client to make use of a file based configuration cache rather
282+
than connecting for the bootstrap operation. If the file does not exist, the
283+
client will first connect to the cluster and then cache the bootstrap information
284+
in the file.
285+
* `truststorepath=PATH`:
286+
The path to the server's SSL certificate. This is typically required for SSL
287+
connectivity unless the certificate has already been added to the OpenSSL
288+
installation on the system (only applicable with `couchbases://` scheme)
289+
* `certpath=PATH`:
290+
The path to the server's SSL certificate. This is typically required for SSL
291+
connectivity unless the certificate has already been added to the OpenSSL
292+
installation on the system (only applicable with `couchbases://` scheme).
293+
This also should contain client certificate when certificate authentication
294+
used, and in this case other public certificates could be extracted into
295+
`truststorepath` chain.
296+
* `keypath=PATH`:
297+
The path to the client SSL private key. This is typically required for SSL
298+
client certificate authentication. The certificate itself have to go first
299+
in chain specified by `certpath` (only applicable with `couchbases://` scheme)
300+
* `ipv6=allow`:
301+
Enable IPv6.
302+
* `ssl=no_verify`:
303+
Temporarily disable certificate verification for SSL (only applicable with
304+
`couchbases://` scheme). This should only be used for quickly debugging SSL
305+
functionality.
306+
* `sasl_mech_force=MECHANISM`:
307+
Force a specific _SASL_ mechanism to be used when performing the initial
308+
connection. This should only need to be modified for debugging purposes.
309+
The currently supported mechanisms are `PLAIN` and `CRAM-MD5`
310+
* `bootstrap_on=<both,http,cccp>`:
311+
Specify the bootstrap protocol the client should use when attempting to connect
312+
to the cluster. Options are: `cccp`: Bootstrap using the Memcached protocol
313+
(supported on clusters 2.5 and greater); `http`: Bootstrap using the HTTP REST
314+
protocol (supported on any cluster version); and `both`: First attempt bootstrap
315+
over the Memcached protocol, and use the HTTP protocol if Memcached bootstrap fails.
316+
The default is `both`
317+
318+
* `enable_tracing=true/false`: Activate/deactivate end-to-end tracing.
319+
320+
* `tracing_orphaned_queue_flush_interval=SECONDS`: Flush interval for orphaned
321+
spans queue in default tracer. This is the time the tracer will wait between
322+
repeated attempts to flush most recent orphaned spans.
323+
Default value is 10 seconds.
324+
325+
* `tracing_orphaned_queue_size=NUMBER`: Size of orphaned spans queue in default
326+
tracer. Queues in default tracer has fixed size, and it will remove
327+
information about older spans, when the limit will be reached before flushing
328+
time.
329+
Default value is 128.
330+
331+
* `tracing_threshold_queue_flush_interval=SECONDS`: Flush interval for spans
332+
with total time over threshold in default tracer. This is the time the tracer
333+
will wait between repeated attempts to flush threshold queue.
334+
Default value is 10 seconds.
335+
336+
* `tracing_threshold_queue_size=NUMBER`: Size of threshold queue in default
337+
tracer. Queues in default tracer has fixed size, and it will remove
338+
information about older spans, when the limit will be reached before flushing
339+
time.
340+
Default value is 128.
341+
342+
* `tracing_threshold_kv=SECONDS`: Minimum time for the tracing span of KV
343+
service to be considered by threshold tracer.
344+
Default value is 0.5 seconds.
345+
346+
* `tracing_threshold_query=SECONDS`: Minimum time for the tracing span of QUERY
347+
service to be considered by threshold tracer.
348+
Default value is 1 second.
349+
350+
* `tracing_threshold_view=SECONDS`: Minimum time for the tracing span of VIEW
351+
service to be considered by threshold tracer.
352+
Default value is 1 second.
353+
354+
* `tracing_threshold_search=SECONDS`: Minimum time for the tracing span of SEARCH
355+
service to be considered by threshold tracer.
356+
Default value is 1 second.
357+
358+
* `tracing_threshold_analytics=SECONDS`: Minimum time for the tracing span of
359+
ANALYTICS service to be considered by threshold tracer.
360+
Default value is 1 second.
361+
207362

208363
## EXAMPLES
209364

0 commit comments

Comments
 (0)