1 <?xml version="1.0" encoding="UTF-8"?>
3 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
6 <refentry id="ctdb-statistics.7">
9 <refentrytitle>ctdb-statistics</refentrytitle>
10 <manvolnum>7</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
16 <refname>ctdb-statistics</refname>
17 <refpurpose>CTDB statistics output</refpurpose>
21 <title>OVERALL STATISTICS</title>
24 CTDB maintains information about various messages communicated
25 and some of the important operations per node. See the
26 <citerefentry><refentrytitle>ctdb</refentrytitle>
27 <manvolnum>1</manvolnum></citerefentry> commands
28 <command>statistics</command> and <command>statisticsreset</command>
29 for displaying statistics.
33 <title>Example: ctdb statistics</title>
36 Current time of statistics : Fri Sep 12 13:32:32 2014
37 Statistics collected since : (000 01:49:20) Fri Sep 12 11:43:12 2014
42 client_packets_sent 281293
43 client_packets_recv 296317
44 node_packets_sent 452387
45 node_packets_recv 182394
46 keepalive_packets_sent 3927
47 keepalive_packets_recv 3928
73 pending_childwrite_calls 0
76 total_ro_delegations 2
78 hop_count_buckets: 42816 5464 26 1 0 0 0 0 0 0 0 0 0 0 0 0
79 lock_buckets: 9 165 14 15 7 2 2 0 0 0 0 0 0 0 0 0
80 locks_latency MIN/AVG/MAX 0.000685/0.160302/6.369342 sec out of 214
81 reclock_ctdbd MIN/AVG/MAX 0.004940/0.004969/0.004998 sec out of 2
82 reclock_recd MIN/AVG/MAX 0.000000/0.000000/0.000000 sec out of 0
83 call_latency MIN/AVG/MAX 0.000006/0.000719/4.562991 sec out of 126626
84 childwrite_latency MIN/AVG/MAX 0.014527/0.014527/0.014527 sec out of 1
89 <title>CTDB version</title>
91 Version of the ctdb protocol used by the node.
96 <title>Current time of statistics</title>
98 Time when the statistics are generated.
101 This is useful when collecting statistics output periodically
107 <title>Statistics collected since</title>
109 Time when ctdb was started or the last time statistics was reset.
110 The output shows the duration and the timestamp.
115 <title>num_clients</title>
117 Number of processes currently connected to CTDB's unix socket.
118 This includes recovery daemon, ctdb tool and samba processes
124 <title>frozen</title>
126 1 if the databases are currently frozen, 0 otherwise.
131 <title>recovering</title>
133 1 if recovery is active, 0 otherwise.
138 <title>num_recoveries</title>
140 Number of recoveries since the start of ctdb or since the last
146 <title>client_packets_sent</title>
148 Number of packets sent to client processes via unix domain socket.
153 <title>client_packets_recv</title>
155 Number of packets received from client processes via unix domain socket.
160 <title>node_packets_sent</title>
162 Number of packets sent to the other nodes in the cluster via TCP.
167 <title>node_packets_recv</title>
169 Number of packets received from the other nodes in the cluster via TCP.
174 <title>keepalive_packets_sent</title>
176 Number of keepalive messages sent to other nodes.
179 CTDB periodically sends keepalive messages to other nodes.
180 See <citetitle>KeepaliveInterval</citetitle> tunable in
181 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
182 <manvolnum>7</manvolnum></citerefentry> for more details.
187 <title>keepalive_packets_recv</title>
189 Number of keepalive messages received from other nodes.
196 This section lists various types of messages processed which
197 originated from other nodes via TCP.
201 <title>req_call</title>
203 Number of REQ_CALL messages from the other nodes.
208 <title>reply_call</title>
210 Number of REPLY_CALL messages from the other nodes.
215 <title>req_dmaster</title>
217 Number of REQ_DMASTER messages from the other nodes.
222 <title>reply_dmaster</title>
224 Number of REPLY_DMASTER messages from the other nodes.
229 <title>reply_error</title>
231 Number of REPLY_ERROR messages from the other nodes.
236 <title>req_message</title>
238 Number of REQ_MESSAGE messages from the other nodes.
243 <title>req_control</title>
245 Number of REQ_CONTROL messages from the other nodes.
250 <title>reply_control</title>
252 Number of REPLY_CONTROL messages from the other nodes.
257 <title>req_tunnel</title>
259 Number of REQ_TUNNEL messages from the other nodes.
266 <title>client</title>
268 This section lists various types of messages processed which
269 originated from clients via unix domain socket.
273 <title>req_call</title>
275 Number of REQ_CALL messages from the clients.
280 <title>req_message</title>
282 Number of REQ_MESSAGE messages from the clients.
287 <title>req_control</title>
289 Number of REQ_CONTROL messages from the clients.
294 <title>req_tunnel</title>
296 Number of REQ_TUNNEL messages from the clients.
303 <title>timeouts</title>
305 This section lists timeouts occurred when sending various messages.
311 Number of timeouts for REQ_CALL messages.
316 <title>control</title>
318 Number of timeouts for REQ_CONTROL messages.
323 <title>traverse</title>
325 Number of timeouts for database traverse operations.
333 This section lists locking statistics.
337 <title>num_calls</title>
339 Number of completed lock calls. This includes database locks
345 <title>num_current</title>
347 Number of scheduled lock calls. This includes database locks
353 <title>num_pending</title>
355 Number of queued lock calls. This includes database locks and
361 <title>num_failed</title>
363 Number of failed lock calls. This includes database locks and
371 <title>total_calls</title>
373 Number of req_call messages processed from clients. This number
374 should be same as client --> req_call.
379 <title>pending_calls</title>
381 Number of req_call messages which are currently being processed.
382 This number indicates the number of record migrations in flight.
387 <title>childwrite_calls</title>
389 Number of record update calls. Record update calls are used to
390 update a record under a transaction.
395 <title>pending_childwrite_calls</title>
397 Number of record update calls currently active.
402 <title>memory_used</title>
404 The amount of memory in bytes currently used by CTDB using
405 talloc. This includes all the memory used for CTDB's internal
406 data structures. This does not include the memory mapped TDB
412 <title>max_hop_count</title>
414 The maximum number of hops required for a record migration request
415 to obtain the record. High numbers indicate record contention.
420 <title>total_ro_delegations</title>
422 Number of readonly delegations created.
427 <title>total_ro_revokes</title>
429 Number of readonly delegations that were revoked. The difference
430 between total_ro_revokes and total_ro_delegations gives the
431 number of currently active readonly delegations.
436 <title>hop_count_buckets</title>
438 Distribution of migration requests based on hop counts values.
439 Buckets are 0, < 2, < 4, < 8,
440 < 16, < 32, < 64, < 128,
441 < 256, < 512, < 1024, < 2048,
442 < 4096, < 8192, < 16384, ≥ 16384.
447 <title>lock_buckets</title>
449 Distribution of record lock requests based on time required to
450 obtain locks. Buckets are < 1ms, < 10ms,
451 < 100ms, < 1s, < 2s, < 4s,
452 < 8s, < 16s, < 32s, < 64s,
458 <title>locks_latency</title>
460 The minimum, the average and the maximum time (in seconds)
461 required to obtain record locks.
466 <title>reclock_ctdbd</title>
468 The minimum, the average and the maximum time (in seconds)
469 required to check if recovery lock is still held by recovery
470 daemon when recovery mode is changed. This check is done in ctdb daemon.
475 <title>reclock_recd</title>
477 The minimum, the average and the maximum time (in seconds)
478 required to check if recovery lock is still held by recovery
479 daemon during recovery. This check is done in recovery daemon.
484 <title>call_latency</title>
486 The minimum, the average and the maximum time (in seconds) required
487 to process a REQ_CALL message from client. This includes the time
488 required to migrate a record from remote node, if the record is
489 not available on the local node.
494 <title>childwrite_latency</title>
495 <para>Default: 0</para>
497 The minimum, the average and the maximum time (in seconds)
498 required to update records under a transaction.
504 <title>DATABASE STATISTICS</title>
507 CTDB maintains per database statistics about important operations.
508 See the <citerefentry><refentrytitle>ctdb</refentrytitle>
509 <manvolnum>1</manvolnum></citerefentry> command
510 <command>dbstatistics</command> for displaying database statistics.
514 <title>Example: ctdb dbstatistics notify_index.tdb</title>
516 DB Statistics: notify_index.tdb
524 hop_count_buckets: 9890 5454 26 1 0 0 0 0 0 0 0 0 0 0 0 0
525 lock_buckets: 4 117 10 0 0 0 0 0 0 0 0 0 0 0 0 0
526 locks_latency MIN/AVG/MAX 0.000683/0.004198/0.014730 sec out of 131
528 Count:7 Key:2f636c75737465726673
529 Count:18 Key:2f636c757374657266732f64617461
530 Count:7 Key:2f636c757374657266732f646174612f636c69656e7473
535 <title>DB Statistics</title>
537 Name of the database.
542 <title>ro_delegations</title>
544 Number of readonly delegations created in the database.
549 <title>ro_revokes</title>
551 Number of readonly delegations revoked. The difference in
552 ro_delegations and ro_revokes indicates the currently active
553 readonly delegations.
560 This section lists locking statistics.
566 Number of completed lock calls. This includes database locks
572 <title>failed</title>
574 Number of failed lock calls. This includes database locks and
580 <title>current</title>
582 Number of scheduled lock calls. This includes database locks
588 <title>pending</title>
590 Number of queued lock calls. This includes database locks and
598 <title>hop_count_buckets</title>
600 Distribution of migration requests based on hop counts values.
601 Buckets are 0, < 2, < 4, < 8,
602 < 16, < 32, < 64, < 128,
603 < 256, < 512, < 1024, < 2048,
604 < 4096, < 8192, < 16384, ≥ 16384.
609 <title>lock_buckets</title>
611 Distribution of record lock requests based on time required to
612 obtain locks. Buckets are < 1ms, < 10ms,
613 < 100ms, < 1s, < 2s, < 4s,
614 < 8s, < 16s, < 32s, < 64s,
620 <title>locks_latency</title>
622 The minimum, the average and the maximum time (in seconds)
623 required to obtain record locks.
628 <title>Num Hot Keys</title>
630 Number of contended records determined by hop count. CTDB keeps
631 track of top 10 hot records and the output shows hex encoded
632 keys for the hot records.
638 <title>SEE ALSO</title>
640 <citerefentry><refentrytitle>ctdb</refentrytitle>
641 <manvolnum>1</manvolnum></citerefentry>,
643 <citerefentry><refentrytitle>ctdbd</refentrytitle>
644 <manvolnum>1</manvolnum></citerefentry>,
646 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
647 <manvolnum>7</manvolnum></citerefentry>,
649 <ulink url="http://ctdb.samba.org/"/>
656 This documentation was written by
664 <holder>Andrew Tridgell</holder>
665 <holder>Ronnie Sahlberg</holder>
669 This program is free software; you can redistribute it and/or
670 modify it under the terms of the GNU General Public License as
671 published by the Free Software Foundation; either version 3 of
672 the License, or (at your option) any later version.
675 This program is distributed in the hope that it will be
676 useful, but WITHOUT ANY WARRANTY; without even the implied
677 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
678 PURPOSE. See the GNU General Public License for more details.
681 You should have received a copy of the GNU General Public
682 License along with this program; if not, see
683 <ulink url="http://www.gnu.org/licenses"/>.