Tap

Tap

The cbstats tap command is used to get statistics associated with tap and cbstats tapagg is used to get statistics from named tap connections.

Description

TAP is an internal protocol that streams information about data changes between cluster nodes. Couchbase Server uses the TAP protocol during rebalance and replication at other cluster nodes. The cbstats tapagg is used to get statistics from named tap connections which are logically grouped and aggregated together by prefixes.

For example, if all of your tap connections started with rebalance_ or replication_ , you could call cbstats tapagg _ to request stats grouped by the prefix starting with _ . This would return a set of statistics for rebalance and a set for replication .

CLI command and parameters

cbstats tap
cbstats tap-takeover vb name
cbstats tapagg

Syntax

Request syntax:


cbstats [host]:11210 tap
cbstats [host]:11210 tapagg
cbstats [host]:11210 tap-takeover vb name
			

Example: tap

Request example for tap stats:

cbstats [host]:11210 tap

Response: tap

Response example for tap stats:


 ep_tap_ack_grace_period:        300
 ep_tap_ack_interval:            1000
 ep_tap_ack_window_size:         10
 ep_tap_backoff_period:          5
 ep_tap_bg_fetch_requeued:       0
 ep_tap_bg_fetched:              0
 ep_tap_bg_max_pending:          500
 ep_tap_count:                   0
 ep_tap_deletes:                 0
 ep_tap_fg_fetched:              0
 ep_tap_noop_interval:           20
 ep_tap_queue_backfillremaining: 0
 ep_tap_queue_backoff:           0
 ep_tap_queue_drain:             0
 ep_tap_queue_fill:              0
 ep_tap_queue_itemondisk:        0
 ep_tap_throttle_queue_cap:      1000000
 ep_tap_throttle_threshold:      90
 ep_tap_throttled:               0
 ep_tap_total_backlog_size:      0
 ep_tap_total_fetched:           0
 ep_tap_total_queue:             0
			
Table 1. tap stats description
Stat Description
ep_tap_ack_grace_period The amount of time to wait for a tap acks before disconnecting
ep_tap_ack_interval The amount of messages a tap producer should send before requesting an ack
ep_tap_ack_window_size The maximum amount of ack requests that can be sent before the consumer sends a response ack. When the window is full the tap stream is paused
ep_tap_backoff_period The number of seconds the tap connection should back off after receiving ETMPFAIL
ep_tap_bg_fetch_requeued Number of times a tap background fetch task is requeued
ep_tap_bg_fetched Number of tap disk fetches
ep_tap_bg_max_pending The maximum number of background jobs a tap connection may have
ep_tap_count Number of tap connections
ep_tap_deletes Number of tap deletion messages sent
ep_tap_fg_fetched Number of tap memory fetches
ep_tap_noop_interval The number of secs between a noop is added to an idle connection
ep_tap_queue_backfillremaining Number of items to be backfilled
ep_tap_queue_backoff Total back-off items
ep_tap_queue_drain Total drained items
ep_tap_queue_fill Total enqueued items
ep_tap_queue_itemondisk Number of items remaining on disk
ep_tap_throttle_queue_cap Disk write queue cap to throttle tap streams
ep_tap_throttle_threshold Percentage of memory in use before we throttle tap streams
ep_tap_throttled Number of tap messages refused due to throttling
ep_tap_total_backlog_size Number of remaining items for replication
ep_tap_total_fetched Sum of all tap messages sent
ep_tap_total_queue Sum of tap queue sizes on the current tap queues

Per Tap client stats

Each stat begins with ep_tapq followed by a unique /client_id/ and another colon. For example, if your client is named, slave1, the qlen stat would be ep_tapq:slave1:qlen.

Stat Description P/C
type The kind of tap connection (producer or PC
consumer)
created Creation time for the tap connection PC
supports_ack true if the connection use acks PC
connected true if this client is connected PC
disconnects Number of disconnects from this client PC
reserved true if the tap stream is reserved P
suspended true if the tap stream is suspended P
qlen Queue size for the given client_id P
qlen_high_pri High priority tap queue items P
qlen_low_pri Low priority tap queue items P
vb_filters Size of connection vbucket filter set P
vb_filter The content of the vbucket filter P
rec_fetched Tap messages sent to the client P
rec_skipped Number of messages skipped due to P
tap reconnect with a different filter P
idle True if this connection is idle P
has_queued_item True if there are any remaining items P
from hash table or disk
bg_result_size Number of ready background results P
bg_jobs_issued Number of background jobs started P
bg_jobs_completed Number of background jobs completed P
flags Connection flags set by the client P
pending_disconnect true if we’re hanging up on this client P
paused true if this client is blocked P
pending_backfill true if we’re still backfilling keys P
for this connection P
pending_disk_backfill true if we’re still backfilling keys P
from disk for this connection P
backfill_completed true if all items from backfill is P
successfully transmitted to the client P
backfill_start_timestamp Timestamp of backfill start P
reconnects Number of reconnects from this client P
backfill_age The age of the start of the backfill P
ack_seqno The current tap ACK sequence number P
recv_ack_seqno Last receive tap ACK sequence number P
ack_log_size Tap ACK backlog size P
ack_window_full true if our tap ACK window is full P
seqno_ack_requested The seqno of the ack message that the P
producer is wants to get a response for
expires When this ACK backlog expires P
queue_memory Memory used for tap queue P
queue_fill Total queued items P
queue_drain Total drained items P
queue_backoff Total back-off items P
queue_backfillremaining Number of backfill remaining P
queue_itemondisk Number of items remaining on disk P
total_backlog_size Num of remaining items for replication P
total_noops Number of NOOP messages sent P
num_checkpoint_end Number of chkpoint end operations C
num_checkpoint_end_failed Number of chkpoint end operations failed C
num_checkpoint_start Number of chkpoint end operations C
num_checkpoint_start_failed Number of chkpoint end operations failed C
num_delete Number of delete operations C
num_delete_failed Number of failed delete operations C
num_flush Number of flush operations C
num_flush_failed Number of failed flush operations C
num_mutation Number of mutation operations C
num_mutation_failed Number of failed mutation operations C
num_opaque Number of opaque operation C
num_opaque_failed Number of failed opaque operations C
num_vbucket_set Number of vbucket set operations C
num_vbucket_set_failed Number of failed vbucket set operations C
num_unknown Number of unknown operations C

Tap aggregated stats

Aggregated tap stats allow named tap connections to be logically grouped and aggregated together by prefixes.

For example, if all of your tap connections started with rebalance_ or replication_ , you could call cbstats tapagg _ to request stats grouped by the prefix starting with _ . This returns a set of statistics for rebalance and a set for replication. The following are possible values returned by cbstats tapagg :

Stat Description
[prefix]:count Number of connections matching this prefix
[prefix]:qlen Total length of queues with this prefix
[prefix]:backfill_remaining Number of items to be backfilled
[prefix]:backoff Total number of backoff events
[prefix]:drain Total number of items drained
[prefix]:fill Total number of items filled
[prefix]:itemondisk Number of items remaining on disk
[prefix]:total_backlog_size Number of remaining items for replication