dcp
Shows statistics for Database Change Protocol (DCP).
Description
This command retrieves connections specific to statistics.
- DCP statistics by connection type
-
DCP provides statistics for consumer, producer, and notifier connection types. The following tables describe the available consumer, producer, and notifier connection statistics. Each connection type has a group of statistics that apply to the connection overall and a group of statistics that apply to the individual streams in the connections.
The identifier for each DCP statistic begins with the string
ep_dcpq:followed by a uniqueclient_idand another colon. For example, if your client is namedslave1, the identifier for the DCP statistic namedcreatedisep_dcpq:slave1:created.Table 1. Consumer connection statistics Name Description connectedTrue if this client is connected
createdCreation time of the DCP connection
pending_disconnectTrue if we’re hanging up on this client
reservedTrue if the DCP stream is reserved
supports_ackTrue if the connection use flow control
total_acked_bytesThe amount of bytes that the consumer has acknowledged
typeThe connection type (producer, consumer, or notifier)
- Consumer connection per-stream statistics
-
Name Description buffer_bytesThe amount of unprocessed bytes
buffer_itemsThe amount of unprocessed items
end_seqnoThe sequence number where this stream should end
flagsThe flags used to create this stream
items_readyWhether the stream has messages ready to send
opaqueThe unique stream identifier
snap_end_seqnoThe end sequence number of the last snapshot received
snap_start_seqnoThe start sequence number of the last snapshot received
start_seqnoThe start sequence number used to create this stream
stateThe stream state (pending, reading, or dead)
vb_uuidThe vBucket UUID used to create this stream
- Producer and notifier connection statistics
-
Name Description backfilledThe amount of items sent from disk
cur_snapshot_endThe end sequence number of the current snapshot being received
cur_snapshot_startThe start sequence number of the current snapshot being received
cur_snapshot_typeThe type of the current snapshot being received
end_seqnoThe sequence number of the last mutation to send
flagsThe flags supplied in the stream request
items_readyWhether the stream has items ready to send
last_sent_seqnoThe last sequence number sent by this stream
memoryThe amount of items sent from memory
opaqueThe unique stream identifier
snap_end_seqnoThe last snapshot end sequence number (used if a consumer is resuming a stream)
snap_start_seqnoThe last snapshot start sequence number (used if a consumer is resuming a stream)
start_seqnoThe sequence number to start sending mutations from
stateThe stream state (pending, backfilling, in-memory, takeover-send, takeover-wait, or dead)
vb_uuidThe vBucket UUID used in the stream request
- Producer and notifier connection statistics
-
Name Description bytes_sentThe amount of unacknowledged bytes sent to the consumer.
connectedTrue if this client is connected.
createdCreation time for the DCP connection.
flow_controlTrue if the connection uses flow control.
items_remainingThe amount of items remaining to be sent.
items_sentThe amount of items already sent to the consumer.
last_sent_timeThe last time items have been sent.
noop_enabledIndicates whether this connection sends noop’s .
noop_waitIndicates whether this connection is waiting for a noop response from the consumer.
pending_disconnectTrue if we’re hanging up on this client.
reservedTrue if the DCP stream is reserved.
supports_ackTrue if the connection uses flow control.
total_acked_bytesThe number of bytes that have been acknowledged by the consumer when flow control is enabled.
total_bytes_sentThe number of bytes already sent to the consumer.
typeThe connection type (producer, consumer, or notifier).
unacked_bytesThe amount of bytes the consumer has not acknowledged.
Example
This example shows a request for all DCP-related statistics.
# ./cbstats 10.5.2.54:11210 dcp
Here’s some output from the command. The output is quite lengthy, so this sample is truncated.
ep_dcp_count: 6 ep_dcp_items_remaining: 0 ep_dcp_items_sent: 0 ep_dcp_producer_count: 3 ep_dcp_queue_backfillremaining: 0 ep_dcp_queue_fill: 0 ep_dcp_total_bytes: 6630 ep_dcp_total_queue: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:connected: true eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:created: 1168 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:pending_disconnect: false eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:reserved: true eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_buffer_bytes: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_buffer_items: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_cur_snapshot_type: none eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_end_seqno: 18446744073709551615 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_flags: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_items_ready: false eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_last_received_seqno: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_opaque: 73 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_snap_end_seqno: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_snap_start_seqno: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_start_seqno: 0 eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_state: reading eq_dcpq:replication:ns_1@10.5.2.117->ns_1@10.5.2.54:default:stream_100_vb_uuid: 122364695596024 ...