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_id
and another colon. For example, if your client is namedslave1
, the identifier for the DCP statistic namedcreated
isep_dcpq:slave1:created
.Table 1. Consumer connection statistics Name Description connected
True if this client is connected
created
Creation time of the DCP connection
pending_disconnect
True if we’re hanging up on this client
reserved
True if the DCP stream is reserved
supports_ack
True if the connection use flow control
total_acked_bytes
The amount of bytes that the consumer has acknowledged
type
The connection type (producer, consumer, or notifier)
- Consumer connection per-stream statistics
-
Name Description buffer_bytes
The amount of unprocessed bytes
buffer_items
The amount of unprocessed items
end_seqno
The sequence number where this stream should end
flags
The flags used to create this stream
items_ready
Whether the stream has messages ready to send
opaque
The unique stream identifier
snap_end_seqno
The end sequence number of the last snapshot received
snap_start_seqno
The start sequence number of the last snapshot received
start_seqno
The start sequence number used to create this stream
state
The stream state (pending, reading, or dead)
vb_uuid
The vBucket UUID used to create this stream
- Producer and notifier connection statistics
-
Name Description backfilled
The amount of items sent from disk
cur_snapshot_end
The end sequence number of the current snapshot being received
cur_snapshot_start
The start sequence number of the current snapshot being received
cur_snapshot_type
The type of the current snapshot being received
end_seqno
The sequence number of the last mutation to send
flags
The flags supplied in the stream request
items_ready
Whether the stream has items ready to send
last_sent_seqno
The last sequence number sent by this stream
memory
The amount of items sent from memory
opaque
The unique stream identifier
snap_end_seqno
The last snapshot end sequence number (used if a consumer is resuming a stream)
snap_start_seqno
The last snapshot start sequence number (used if a consumer is resuming a stream)
start_seqno
The sequence number to start sending mutations from
state
The stream state (pending, backfilling, in-memory, takeover-send, takeover-wait, or dead)
vb_uuid
The vBucket UUID used in the stream request
- Producer and notifier connection statistics
-
Name Description bytes_sent
The amount of unacknowledged bytes sent to the consumer.
connected
True if this client is connected.
created
Creation time for the DCP connection.
flow_control
True if the connection uses flow control.
items_remaining
The amount of items remaining to be sent.
items_sent
The amount of items already sent to the consumer.
last_sent_time
The last time items have been sent.
noop_enabled
Indicates whether this connection sends noop’s .
noop_wait
Indicates whether this connection is waiting for a noop response from the consumer.
pending_disconnect
True if we’re hanging up on this client.
reserved
True if the DCP stream is reserved.
supports_ack
True if the connection uses flow control.
total_acked_bytes
The number of bytes that have been acknowledged by the consumer when flow control is enabled.
total_bytes_sent
The number of bytes already sent to the consumer.
type
The connection type (producer, consumer, or notifier).
unacked_bytes
The 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 ...