You are viewing the documentation for a prerelease version.

View Latest

scopes-details

Provides low-level details on scopes.

Syntax

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

Description

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

Options

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 scopes for the bucket.

For common cbstats options, see cbstats.

Examples

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

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

The initial section of the output is as follows:

manifest:scopes:                         2
manifest:scopes:0x0:collections:         2
manifest:scopes:0x0:name:                _default
manifest:scopes:0x8:collections:         2
manifest:scopes:0x8:name:                my_scope
manifest:uid:                            4
vb_0:manifest:scope:0x0:collection:0:    0xa
vb_0:manifest:scope:0x0:collection:2:    0x0
vb_0:manifest:scope:0x8:collection:1:    0x9
vb_0:manifest:scope:0x8:collection:3:    0x8
vb_0:manifest:scopes:                    2
vb_0:manifest:scopes:0:                  0x8
vb_0:manifest:scopes:1:                  0x0
vb_1:manifest:scope:0x0:collection:0:    0xa
vb_1:manifest:scope:0x0:collection:2:    0x0
vb_1:manifest:scope:0x8:collection:1:    0x9
vb_1:manifest:scope:0x8:collection:3:    0x8
      .
      .
      .

The initial six lines provide information that identifies existing scopes. A total of 2 are listed, including the _default scope. Each is identified with a hexadecimal number: for example, the _default scope 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 scopes-details 8

Details for vBucket 8 are duly returned:

vb_8:manifest:scope:0x0:collection:0: 0xa
vb_8:manifest:scope:0x0:collection:2: 0x0
vb_8:manifest:scope:0x8:collection:1: 0x9
vb_8:manifest:scope:0x8:collection:3: 0x8
vb_8:manifest:scopes:                 2
vb_8:manifest:scopes:0:               0x8
vb_8:manifest:scopes:1:               0x0

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 scopes, see the reference page for the scopes command.