Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
7 Command-line Interface for Administration
Chapter Sections
Chapters

7.5. cbstats Tool

7.5.1. Getting Server Timings
7.5.2. Getting Warmup Information
7.5.3. Getting TAP Information

You use the cbstats tool to get node- and cluster-level statistics about performance and items in storage. The tool can be found in the following locations, depending on your platform:

Linux/opt/couchbase/bin/cbstats
WindowsC:\Program Files\Couchbase\Server\bin\cbstats.exe
Mac OS X/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbstats

Be aware that this tool is a per-node, per-bucket operation. That means that if you want to perform this operation, you must specify the IP address of a node in the cluster and a named bucket. If you do not provided a named bucket, the server will apply the setting to any default bucket that exists at the specified node. If you want to perform this operation for an entire cluster, you will need to perform the command for every node/bucket combination that exists for that cluster.

You use this tool to get the couchbase node statistics. The general format for the command is:

shell> cbstats <IP>:11210 <command> -b <bucket_name> [-p <bucket_password>]

Where BUCKET_HOST is the hostname and port (HOSTNAME[:PORT]) combination for a Couchbase bucket, and username and password are the authentication for the named bucket. COMMAND(and[options]) are one of the follow options:

all
allocator
checkpoint [vbid]
dispatcher [logs]
hash [detail]
items
kvstore
kvtimings
raw argument
reset
slabs
tap [username password]
tapagg
timings
vkey keyname vbid

From these options, all and timings will be the main ones you will use to understand cluster or node performance. The other options are used by Couchbase internally and to help resolve customer support incidents.

For example, the cbstats output can be used with other command-line tools to sort and filter the data.

shell> watch --diff "cbstats \
    ip-10-12-19-81:11210 -b bucket1 -p password all | egrep 'item|mem|flusher|ep_queue|bg|eje|resi|warm'"

The following table provides a list of results that will be returned when you perform a cbstats all command:

StatDescription
ep_versionVersion number of ep_engine.
ep_storage_ageSeconds since most recently stored object was initially queued.
ep_storage_age_highwatep_storage_age high water mark
ep_min_data_ageMinimum data age setting.
ep_startup_timeSystem-generated engine startup time
ep_queue_age_capQueue age cap setting.
ep_max_txn_sizeMax number of updates per transaction.
ep_data_ageSeconds since most recently stored object was modified.
ep_data_age_highwatep_data_age high water mark
ep_too_youngNumber of times an object was not stored due to being too young.
ep_too_oldNumber of times an object was stored after being dirty too long.
ep_total_enqueuedTotal number of items queued for persistence
ep_total_new_itemsTotal number of persisted new items.
ep_total_del_itemsTotal number of persisted deletions.
ep_total_persistedTotal number of items persisted.
ep_item_flush_failedNumber of times an item failed to flush due to storage errors.
ep_item_commit_failedNumber of times a transaction failed to commit due to storage errors.
ep_item_begin_failedNumber of times a transaction failed to start due to storage errors.
ep_expired_accessNumber of times an item was expired on application access.
ep_expired_pagerNumber of times an item was expired by ep engine item pager.
ep_item_flush_expiredNumber of times an item is not flushed due to the expiry of the item
ep_queue_sizeNumber of items queued for storage.
ep_flusher_todoNumber of items remaining to be written.
ep_flusher_stateCurrent state of the flusher thread.
ep_commit_numTotal number of write commits.
ep_commit_timeNumber of milliseconds of most recent commit
ep_commit_time_totalCumulative milliseconds spent committing.
ep_vbucket_delNumber of vbucket deletion events.
ep_vbucket_del_failNumber of failed vbucket deletion events.
ep_vbucket_del_max_walltimeMax wall time (µs) spent by deleting a vbucket
ep_vbucket_del_avg_walltimeAvg wall time (µs) spent by deleting a vbucket
ep_flush_duration_totalCumulative seconds spent flushing.
ep_flush_allTrue if disk flush_all is scheduled
ep_num_ops_get_metaNumber of getMeta operations
ep_num_ops_set_metaNumber of setWithMeta operations
ep_num_ops_del_metaNumber of delWithMeta operations
curr_itemsNum items in active vbuckets (temp + live)
curr_temp_itemsNum temp items in active vbuckets
curr_items_totNum current items including those not active (replica, dead and pending states)
ep_kv_sizeMemory used to store item metadata, keys and values, no matter the vbucket’s state. If an item’s value is ejected, this stat will be decremented by the size of the item’s value.
ep_value_sizeMemory used to store values for resident keys
ep_overheadExtra memory used by transient data like persistence queues, replication queues, checkpoints, etc.
ep_max_data_sizeMax amount of data allowed in memory.
ep_mem_low_watLow water mark for auto-evictions.
ep_mem_high_watHigh water mark for auto-evictions.
ep_total_cache_sizeThe total byte size of all items, no matter the vbucket’s state, no matter if an item’s value is ejected.
ep_oom_errorsNumber of times unrecoverable OOMs happened while processing operations
ep_tmp_oom_errorsNumber of times temporary OOMs happened while processing operations
ep_mem_tracker_enabledTrue if memory usage tracker is enabled
ep_bg_fetchedNumber of items fetched from disk.
ep_bg_meta_fetchedNumber of meta items fetched from disk.
ep_bg_remaining_jobsNumber of remaining background fetch jobs.
ep_tap_bg_fetchedNumber of tap disk fetches
ep_tap_bg_fetch_requeuedNumber of times a tap background fetch task is re-queued.
ep_num_pager_runsNumber of times we ran pager loops to seek additional memory.
ep_num_expiry_pager_runsNumber of times we ran expiry pager loops to purge expired items from memory/disk
ep_num_access_scanner_runsNumber of times we ran access scanner to snapshot working set
ep_access_scanner_num_itemsNumber of items that last access scanner task swept to access log.
ep_access_scanner_task_timeTime of the next access scanner task (GMT)
ep_access_scanner_last_runtimeNumber of seconds that last access scanner task took to complete.
ep_items_rm_from_checkpointsNumber of items removed from closed unreferenced checkpoints.
ep_num_value_ejectsNumber of times item values got ejected from memory to disk
ep_num_eject_failuresNumber of items that could not be ejected
ep_num_not_my_vbucketsNumber of times Not My VBucket exception happened during runtime
ep_tap_keepaliveTap keep-alive time.
ep_dbnameDB path.
ep_dbinitNumber of seconds to initialize DB.
ep_io_num_readNumber of io read operations
ep_io_num_writeNumber of io write operations
ep_io_read_bytesNumber of bytes read (key + values)
ep_io_write_bytesNumber of bytes written (key + values)
ep_pending_opsNumber of ops awaiting pending vbuckets
ep_pending_ops_totalTotal blocked pending ops since reset
ep_pending_ops_maxMax ops seen awaiting 1 pending vbucket
ep_pending_ops_max_durationMax time (µs) used waiting on pending vbuckets
ep_bg_num_samplesThe number of samples included in the average
ep_bg_min_waitThe shortest time (µs) in the wait queue
ep_bg_max_waitThe longest time (µs) in the wait queue
ep_bg_wait_avgThe average wait time (µs) for an item before it is serviced by the dispatcher
ep_bg_min_loadThe shortest load time (µs)
ep_bg_max_loadThe longest load time (µs)
ep_bg_load_avgThe average time (µs) for an item to be loaded from the persistence layer
ep_num_non_residentThe number of non-resident items
ep_store_max_concurrencyMaximum allowed concurrency at the storage layer.
ep_store_max_readersMaximum number of concurrent read-only storage threads.
ep_store_max_readwriteMaximum number of concurrent read/write storage threads.
ep_bg_waitThe total elapse time for the wait queue
ep_bg_loadThe total elapse time for items to be loaded from the persistence layer
ep_inconsistent_slave_chkFlag indicating if we allow a “downstream” master to receive checkpoint messages
ep_mlog_compactor_runsNumber of times mutation log compactor is executed
ep_vb_totalTotal vBuckets (count)
curr_items_totTotal number of items
curr_itemsNumber of active items in memory
curr_temp_itemsNumber of temporary items in memory
vb_dead_numNumber of dead vBuckets
ep_diskqueue_itemsTotal items in disk queue
ep_diskqueue_memoryTotal memory used in disk queue
ep_diskqueue_fillTotal enqueued items on disk queue
ep_diskqueue_drainTotal drained items on disk queue
ep_diskqueue_pendingTotal bytes of pending writes
ep_vb_snapshot_totalTotal VB state snapshots persisted in disk
vb_active_numNumber of active vBuckets
vb_active_curr_itemsNumber of in memory items
vb_active_num_non_residentNumber of non-resident items
vb_active_perc_mem_resident% memory resident
vb_active_ejectNumber of times item values got ejected
vb_active_expiredNumber of times an item was expired
vb_active_ht_memoryMemory overhead of the hashtable
vb_active_itm_memoryTotal item memory
vb_active_meta_data_memoryTotal metadata memory
vb_active_ops_createNumber of create operations
vb_active_ops_updateNumber of update operations
vb_active_ops_deleteNumber of delete operations
vb_active_ops_rejectNumber of rejected operations
vb_active_queue_sizeActive items in disk queue
vb_active_queue_memoryMemory used for disk queue
vb_active_queue_ageSum of disk queue item age in milliseconds
vb_active_queue_pendingTotal bytes of pending writes
vb_active_queue_fillTotal enqueued items
vb_active_queue_drainTotal drained items
vb_active_num_ref_itemsNumber of referenced items
vb_active_num_ref_ejectsNumber of times referenced item values got ejected
vb_pending_numNumber of pending vBuckets
vb_pending_curr_itemsNumber of in memory items
vb_pending_num_non_residentNumber of non-resident items
vb_pending_perc_mem_resident% of memory used for resident items
vb_pending_ejectNumber of times item values got ejected
vb_pending_expiredNumber of times an item was expired
vb_pending_ht_memoryMemory overhead of the hashtable
vb_pending_itm_memoryTotal item in memory
vb_pending_meta_data_memoryTotal metadata memory
vb_pending_ops_createNumber of create operations
vb_pending_ops_updateNumber of update operations
vb_pending_ops_deleteNumber of delete operations
vb_pending_ops_rejectNumber of rejected operations
vb_pending_queue_sizePending items in disk queue
vb_pending_queue_memoryMemory used for disk queue
vb_pending_queue_ageSum of disk queue item age in milliseconds
vb_pending_queue_pendingTotal bytes of pending writes
vb_pending_queue_fillTotal enqueued items
vb_pending_queue_drainTotal drained items
vb_pending_num_ref_itemsNumber of referenced items
vb_pending_num_ref_ejectsNumber of times referenced item values got ejected