CTDB-STATISTICS(7)
πΈ NAME πΈ
ctdb-statistics β CTDB statistics output π«
π OVERALL STATISTICS π
okay so CTDB is out here keeping receipts π β it tracks info about all the messages flying around and the big-girl operations happening on every single node. wanna see them? the ctdb(1) commands statistics and statisticsreset are right there, bestie. one shows, one clears. slay.
β¨ Example: ctdb statistics β¨
CTDB version 1
Current time of statistics : Fri Sep 12 13:32:32 2014
Statistics collected since : (000 01:49:20) Fri Sep 12 11:43:12 2014
num_clients 6
frozen 0
recovering 0
num_recoveries 2
client_packets_sent 281293
client_packets_recv 296317
node_packets_sent 452387
node_packets_recv 182394
keepalive_packets_sent 3927
keepalive_packets_recv 3928
node
req_call 48605
reply_call 1
req_dmaster 23404
reply_dmaster 24917
reply_error 0
req_message 958
req_control 197513
reply_control 153705
client
req_call 130866
req_message 770
req_control 168921
timeouts
call 0
control 0
traverse 0
locks
num_calls 220
num_current 0
num_pending 0
num_failed 0
total_calls 130866
pending_calls 0
childwrite_calls 1
pending_childwrite_calls 0
memory_used 334490
max_hop_count 18
total_ro_delegations 2
total_ro_revokes 2
hop_count_buckets: 42816 5464 26 1 0 0 0 0 0 0 0 0 0 0 0 0
lock_buckets: 9 165 14 15 7 2 2 0 0 0 0 0 0 0 0 0
locks_latency MIN/AVG/MAX 0.000685/0.160302/6.369342 sec out of 214
reclock_ctdbd MIN/AVG/MAX 0.004940/0.004969/0.004998 sec out of 2
reclock_recd MIN/AVG/MAX 0.000000/0.000000/0.000000 sec out of 0
call_latency MIN/AVG/MAX 0.000006/0.000719/4.562991 sec out of 126626
childwrite_latency MIN/AVG/MAX 0.014527/0.014527/0.014527 sec out of 1
π What every single line means π
CTDB version
the version of the ctdb protocol this node is running. iconic. π
Current time of statistics
the moment these stats were generated β° β super handy when you're grabbing the output on a schedule and post-processing it later. iykyk.
Statistics collected since
when ctdb was started, or the last time someone ran statisticsreset. the output shows you both the duration and the timestamp π«Ά.
num_clients
how many processes are currently connected to CTDB's unix socket right now. this includes the recovery daemon, the ctdb tool, and samba processes (smbd, winbindd) β the whole friend group basically π.
frozen
1 if the databases are currently frozen, 0 if they're not π§.
recovering
1 if recovery is active right now, 0 if it's not.
num_recoveries
how many recoveries have happened since ctdb started, or since the last statistics reset. bestie has been through some things π.
client_packets_sent
number of packets sent to client processes over the unix domain socket π€.
client_packets_recv
number of packets received from client processes over the unix domain socket π₯.
node_packets_sent
number of packets sent to the other nodes in the cluster over TCP π¦.
node_packets_recv
number of packets received from the other nodes in the cluster over TCP.
keepalive_packets_sent
number of keepalive messages sent to the other nodes.
CTDB periodically pings the other nodes with keepalive messages to check they're still alive π β go peek at the KeepaliveInterval tunable in ctdb-tunables(7) if you want the deets.
keepalive_packets_recv
number of keepalive messages received from the other nodes.
node
this section is a whole vibe check on the message types processed that came from other nodes over TCP π°οΈ.
req_callβ number ofREQ_CALLmessages from the other nodes.reply_callβ number ofREPLY_CALLmessages from the other nodes.req_dmasterβ number ofREQ_DMASTERmessages from the other nodes.reply_dmasterβ number ofREPLY_DMASTERmessages from the other nodes.reply_errorβ number ofREPLY_ERRORmessages from the other nodes.req_messageβ number ofREQ_MESSAGEmessages from the other nodes.req_controlβ number ofREQ_CONTROLmessages from the other nodes.reply_controlβ number ofREPLY_CONTROLmessages from the other nodes.req_tunnelβ number ofREQ_TUNNELmessages from the other nodes.
client
same energy, but for messages that came from clients over the unix domain socket π.
req_callβ number ofREQ_CALLmessages from the clients.req_messageβ number ofREQ_MESSAGEmessages from the clients.req_controlβ number ofREQ_CONTROLmessages from the clients.req_tunnelβ number ofREQ_TUNNELmessages from the clients.
timeouts
this section lists the timeouts that happened while sending various messages β³ β not the fun kind of waiting.
callβ number of timeouts forREQ_CALLmessages.controlβ number of timeouts forREQ_CONTROLmessages.traverseβ number of timeouts for database traverse operations.
locks
locking statistics, and yes, they're all about both database locks and record locks π.
num_callsβ number of completed lock calls. includes database locks and record locks.num_currentβ number of scheduled lock calls. includes database locks and record locks.num_pendingβ number of queued lock calls. includes database locks and record locks.num_failedβ number of failed lock calls. includes database locks and record locks.
total_calls
number of req_call messages processed from clients. this number should match client --> req_call, so if it doesn'tβ¦ π
pending_calls
number of req_call messages currently being processed. this is basically the number of record migrations in flight βοΈ.
childwrite_calls
number of record update calls. record update calls are what you use to update a record under a transaction πΎ.
pending_childwrite_calls
number of record update calls that are active right now.
memory_used
how much memory, in bytes, CTDB is currently using via talloc π§ . this covers all the memory used for CTDB's internal data structures. it does not include the memory mapped TDB databases β important distinction, bestie.
max_hop_count
the maximum number of hops a record migration request needed to obtain the record. big numbers here = record contention, and record contention is not the vibe π€.
total_ro_delegations
number of readonly delegations created.
total_ro_revokes
number of readonly delegations that got revoked π. subtract total_ro_revokes from total_ro_delegations and you get the number of currently active readonly delegations. math but make it useful.
hop_count_buckets
the distribution of migration requests, bucketed by hop count value. the buckets are 0, < 2, < 4, < 8, < 16, < 32, < 64, < 128, < 256, < 512, < 1024, < 2048, < 4096, < 8192, < 16384, β₯ 16384 πͺ£.
lock_buckets
the distribution of record lock requests, bucketed by how long it took to actually get the lock. the buckets are < 1ms, < 10ms, < 100ms, < 1s, < 2s, < 4s, < 8s, < 16s, < 32s, < 64s, β₯ 64s.
locks_latency
the minimum, average, and maximum time (in seconds) it took to obtain record locks β±οΈ.
reclock_ctdbd
the minimum, average, and maximum time (in seconds) needed to check whether the recovery lock is still held by the recovery daemon when recovery mode is changed. this check happens in the ctdb daemon π.
reclock_recd
the minimum, average, and maximum time (in seconds) needed to check whether the recovery lock is still held by the recovery daemon during recovery. this check happens in the recovery daemon. yes, they're different checks. no, you don't get to merge them π .
call_latency
the minimum, average, and maximum time (in seconds) needed to process a REQ_CALL message from a client. this includes the time needed to migrate a record from a remote node, if that record isn't available on the local node π.
childwrite_latency
Default: 0
the minimum, average, and maximum time (in seconds) needed to update records under a transaction.
ποΈ DATABASE STATISTICS ποΈ
CTDB also keeps per-database stats on the operations that actually matter π₯. to see them, use the ctdb(1) command dbstatistics.
β¨ Example: ctdb dbstatistics notify_index.tdb β¨
DB Statistics: notify_index.tdb
ro_delegations 0
ro_revokes 0
locks
total 131
failed 0
current 0
pending 0
hop_count_buckets: 9890 5454 26 1 0 0 0 0 0 0 0 0 0 0 0 0
lock_buckets: 4 117 10 0 0 0 0 0 0 0 0 0 0 0 0 0
locks_latency MIN/AVG/MAX 0.000683/0.004198/0.014730 sec out of 131
Num Hot Keys: 3
Count:7 Key:2f636c75737465726673
Count:18 Key:2f636c757374657266732f64617461
Count:7 Key:2f636c757374657266732f646174612f636c69656e7473
π What every single line means (database edition) π
DB Statistics
the name of the database. that's it, that's the whole entry πΈ.
ro_delegations
number of readonly delegations created in this database.
ro_revokes
number of readonly delegations revoked. the difference between ro_delegations and ro_revokes tells you how many readonly delegations are currently active π«Ά.
locks
locking statistics. and yeah β all of these cover both database locks and record locks π.
totalβ number of completed lock calls. includes database locks and record locks.failedβ number of failed lock calls. includes database locks and record locks.currentβ number of scheduled lock calls. includes database locks and record locks.pendingβ number of queued lock calls. includes database locks and record locks.
hop_count_buckets
the distribution of migration requests, bucketed by hop count value. buckets are 0, < 2, < 4, < 8, < 16, < 32, < 64, < 128, < 256, < 512, < 1024, < 2048, < 4096, < 8192, < 16384, β₯ 16384 πͺ£.
lock_buckets
the distribution of record lock requests, bucketed by how long the lock took to obtain. buckets are < 1ms, < 10ms, < 100ms, < 1s, < 2s, < 4s, < 8s, < 16s, < 32s, < 64s, β₯ 64s.
locks_latency
the minimum, average, and maximum time (in seconds) needed to obtain record locks β±οΈ.
Num Hot Keys
the number of contended records, determined by hop count π₯π₯. CTDB keeps track of the top 10 hot records, and the output shows you the hex encoded keys for those hot records. main character records only, honestly π.
part 1 done, bestie β but we are not done π more stats lore is coming in part 2, don't go anywhere π
π SEE ALSO π
okay bestie, if you wanna go deeper (and you KNOW you do), go peek at these π
πΈ AUTHOR πΈ
this whole documentation situation was written by Amitay Isaacs and Martin Schwenke β absolute icons, no cap π«Ά
π COPYRIGHT π
Copyright Β© 2007 Andrew Tridgell, Ronnie Sahlberg
so here's the legal tea, and it's giving very much "read it, bestie" ββ¨
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. π (yes that's the scary all-caps part, it's literally in the license, i don't make the rules)
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
and that's a wrap on CTDB-STATISTICS(7) πβ¨ this page is serving ctdb energy, dated 09/09/2026 β go forth and read your stats, main character π
π
π¦ where this page comes from
- fedora 44: ctdb 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- ubuntu noble: ctdb 2:4.19.5+dfsg-4ubuntu9.8 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms