• Developer Preview
Provides low-level details on collections.


cbstats host:11210 [common options] collections-details [vbucket-reference]


This command is used to provide low-level details on collections, for a specified bucket. This includes details identifying the existing collections; and vBucket-specific details, which include sequence numbers and item counts.


The optional vbucket-reference parameter is an integer, in the range of 0 to 1023 inclusive, specifying a particular vBucket. If a vBucket is specified, the only details returned are the vBucket-specific details for that vBucket. If no vBucket is specified, vBucket-specific details for all vBuckets are returned, as well as details identifying the existing collections for the bucket.

For common cbstats options, see cbstats.


The following command retrieves collections-details on all vBuckets for testBucket:

/opt/couchbase/bin/cbstats -u Administrator -p password -b testBucket \
localhost:11210 collections-details

The initial section of the output is as follows:

manifest:collection:0x0:name:                      _default
manifest:collection:0x8:name:                      my_collection_in_my_scope_1
manifest:collection:0x9:name:                      my_collection_in_my_scope_2
manifest:collection:0xa:name:                      my_collection_in_default_scope
manifest:collections:                              4
manifest:default_exists:                           true
manifest:uid:                                      4
vb_0:collection:0x0:entry:high_seqno:              0
vb_0:collection:0x0:entry:items:                   0
vb_0:collection:0x0:entry:persisted_high_seqno:    0
vb_0:collection:0x0:entry:scope:                   0
vb_0:collection:0x0:entry:start_seqno:             0
vb_0:collection:0x8:entry:high_seqno:              2
vb_0:collection:0x8:entry:items:                   0
vb_0:collection:0x8:entry:persisted_high_seqno:    2
vb_0:collection:0x8:entry:scope:                   8
vb_0:collection:0x8:entry:start_seqno:             2
vb_0:collection:0x9:entry:high_seqno:              3
vb_0:collection:0x9:entry:items:                   0

The initial seven lines provide information that identifies existing collections. A total of 4 are listed, including the _default collection. Each is identified with a hexadecimal number: for example, the _default collection is identified as 0x0.

Subsequent information in the output relates to each vBucket corresponding to testBucket. The vBuckets are numbered, from 0 to 1023. For each vBucket, information is provided on sequence numbers and total items.

The following command specifies a vbucket-reference, thereby returning information on the specified vBucket only:

/opt/couchbase/bin/cbstats -u Administrator -p password \
-b testBucket localhost:11210 collections-details 8

Details for vBucket 8 are duly returned:

vb_8:collection:0x0:entry:high_seqno:           0
vb_8:collection:0x0:entry:items:                0
vb_8:collection:0x0:entry:persisted_high_seqno: 0
vb_8:collection:0x0:entry:scope:                0
vb_8:collection:0x0:entry:start_seqno:          0
vb_8:collection:0x8:entry:high_seqno:           2
vb_8:collection:0x8:entry:items:                0
vb_8:collection:0x8:entry:persisted_high_seqno: 2
vb_8:collection:0x8:entry:scope:                8
vb_8:collection:0x8:entry:start_seqno:          2
vb_8:collection:0x9:entry:high_seqno:           3
vb_8:collection:0x9:entry:items:                0
vb_8:collection:0x9:entry:persisted_high_seqno: 3
vb_8:collection:0x9:entry:scope:                8
vb_8:collection:0x9:entry:start_seqno:          3
vb_8:collection:0xa:entry:high_seqno:           4
vb_8:collection:0xa:entry:items:                0
vb_8:collection:0xa:entry:persisted_high_seqno: 4
vb_8:collection:0xa:entry:scope:                0
vb_8:collection:0xa:entry:start_seqno:          4
vb_8:manifest:default_exists:                   true
vb_8:manifest:entries:                          4

See Also

For a step-by-step explanation of creating scopes and collections with the CLI, see Manage Collections with the CLI. For a comparable explanation with the REST API, see Manage Collections with the REST API.

To use cbstats to provide higher-level information on collections, see the reference page for the collections command.