A newer version of this documentation is available.

View Latest

vkey

Provides information on keys.

Syntax

Request syntax:

cbstats [hostname]:11210 vkey [keyname] [vbid]

Description

The following key information is available.

Stat Description K/V

key_cas

The keys current cas value

KV

key_data_age

How long the key has waited for its value to be persisted (0 if clean)

KV

key_exptime

Expiration time from the epoch

KV

key_flags

Flags for this key

KV

key_is_dirty

If the value is not yet persisted

KV

key_valid

See description below

V

key_vb_state

The vbucket state of this key

KV

key_valid= can have the following responses:

  • this_is_a_bug: Some case we didn’t take care of.

  • dirty:The value in memory has not been persisted yet.

  • length_mismatch: The key length in memory doesn’t match the length on the disk.

  • data_mismatch: The data in memory doesn’t match the data on disk.

  • flags_mismatch: The flags in memory don’t match the flags on disk.

  • valid: The key is both on disk and in memory

  • ram_but_not_disk: The value doesn’t exist yet on disk.

  • item_deleted: The item has been deleted.

Options

Table 1. vkey options
Option Description

KEYNAME

Name of the key.

VBID

vBucket ID.

Example

Request

cbstats 10.5.2.54:11210 vkey foo 115