smbtorture: Use NT_STATUS_PENDING instead of STATUS_PENDING
[Samba.git] / ctdb / doc / ctdb-statistics.7.xml
blob387852d549825b9c99a4d45b035dfb3cc072455b
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
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">
8   <refmeta>
9     <refentrytitle>ctdb-statistics</refentrytitle>
10     <manvolnum>7</manvolnum>
11     <refmiscinfo class="source">ctdb</refmiscinfo>
12     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13   </refmeta>
15   <refnamediv>
16     <refname>ctdb-statistics</refname>
17     <refpurpose>CTDB statistics output</refpurpose>
18   </refnamediv>
20   <refsect1>
21     <title>OVERALL STATISTICS</title>
23     <para>
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.
30     </para>
32       <refsect2>
33         <title>Example: ctdb statistics</title>
34         <screen>
35 CTDB version 1
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
38  num_clients                        6
39  frozen                             0
40  recovering                         0
41  num_recoveries                     2
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
48  node
49      req_call                   48605
50      reply_call                     1
51      req_dmaster                23404
52      reply_dmaster              24917
53      reply_error                    0
54      req_message                  958
55      req_control               197513
56      reply_control             153705
57  client
58      req_call                  130866
59      req_message                  770
60      req_control               168921
61  timeouts
62      call                           0
63      control                        0
64      traverse                       0
65  locks
66      num_calls                    220
67      num_current                    0
68      num_pending                    0
69      num_failed                     0
70  total_calls                   130866
71  pending_calls                      0
72  childwrite_calls                   1
73  pending_childwrite_calls             0
74  memory_used                   334490
75  max_hop_count                     18
76  total_ro_delegations               2
77  total_ro_revokes                   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
85         </screen>
86       </refsect2>
88     <refsect2>
89       <title>CTDB version</title>
90       <para>
91         Version of the ctdb protocol used by the node.
92       </para>
93     </refsect2>
95     <refsect2>
96       <title>Current time of statistics</title>
97       <para>
98         Time when the statistics are generated.
99       </para>
100       <para>
101         This is useful when collecting statistics output periodically
102         for post-processing.
103       </para>
104     </refsect2>
106     <refsect2>
107       <title>Statistics collected since</title>
108       <para>
109         Time when ctdb was started or the last time statistics was reset.
110         The output shows the duration and the timestamp.
111       </para>
112     </refsect2>
114     <refsect2>
115       <title>num_clients</title>
116       <para>
117         Number of processes currently connected to CTDB's unix socket.
118         This includes recovery daemon, ctdb tool and samba processes
119         (smbd, winbindd).
120       </para>
121     </refsect2>
123     <refsect2>
124       <title>frozen</title>
125       <para>
126         1 if the databases are currently frozen, 0 otherwise.
127       </para>
128     </refsect2>
130     <refsect2>
131       <title>recovering</title>
132       <para>
133         1 if recovery is active, 0 otherwise.
134       </para>
135     </refsect2>
137     <refsect2>
138       <title>num_recoveries</title>
139       <para>
140         Number of recoveries since the start of ctdb or since the last
141         statistics reset.
142       </para>
143     </refsect2>
145     <refsect2>
146       <title>client_packets_sent</title>
147       <para>
148         Number of packets sent to client processes via unix domain socket.
149       </para>
150     </refsect2>
152     <refsect2>
153       <title>client_packets_recv</title>
154       <para>
155         Number of packets received from client processes via unix domain socket.
156       </para>
157     </refsect2>
159     <refsect2>
160       <title>node_packets_sent</title>
161       <para>
162         Number of packets sent to the other nodes in the cluster via TCP.
163       </para>
164     </refsect2>
166     <refsect2>
167       <title>node_packets_recv</title>
168       <para>
169         Number of packets received from the other nodes in the cluster via TCP.
170       </para>
171     </refsect2>
173     <refsect2>
174       <title>keepalive_packets_sent</title>
175       <para>
176         Number of keepalive messages sent to other nodes.
177       </para>
178       <para>
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.
183       </para>
184     </refsect2>
186     <refsect2>
187       <title>keepalive_packets_recv</title>
188       <para>
189         Number of keepalive messages received from other nodes.
190       </para>
191     </refsect2>
193     <refsect2>
194       <title>node</title>
195       <para>
196         This section lists various types of messages processed which
197         originated from other nodes via TCP.
198       </para>
200     <refsect3>
201       <title>req_call</title>
202       <para>
203         Number of REQ_CALL messages from the other nodes.
204       </para>
205     </refsect3>
207     <refsect3>
208       <title>reply_call</title>
209       <para>
210         Number of REPLY_CALL messages from the other nodes.
211       </para>
212     </refsect3>
214     <refsect3>
215       <title>req_dmaster</title>
216       <para>
217         Number of REQ_DMASTER messages from the other nodes.
218       </para>
219     </refsect3>
221     <refsect3>
222       <title>reply_dmaster</title>
223       <para>
224         Number of REPLY_DMASTER messages from the other nodes.
225       </para>
226     </refsect3>
228     <refsect3>
229       <title>reply_error</title>
230       <para>
231         Number of REPLY_ERROR messages from the other nodes.
232       </para>
233     </refsect3>
235     <refsect3>
236       <title>req_message</title>
237       <para>
238         Number of REQ_MESSAGE messages from the other nodes.
239       </para>
240     </refsect3>
242     <refsect3>
243       <title>req_control</title>
244       <para>
245         Number of REQ_CONTROL messages from the other nodes.
246       </para>
247     </refsect3>
249     <refsect3>
250       <title>reply_control</title>
251       <para>
252         Number of REPLY_CONTROL messages from the other nodes.
253       </para>
254     </refsect3>
256     <refsect3>
257       <title>req_tunnel</title>
258       <para>
259         Number of REQ_TUNNEL messages from the other nodes.
260       </para>
261     </refsect3>
263     </refsect2>
265     <refsect2>
266       <title>client</title>
267       <para>
268         This section lists various types of messages processed which
269         originated from clients via unix domain socket.
270       </para>
272     <refsect3>
273       <title>req_call</title>
274       <para>
275         Number of REQ_CALL messages from the clients.
276       </para>
277     </refsect3>
279     <refsect3>
280       <title>req_message</title>
281       <para>
282         Number of REQ_MESSAGE messages from the clients.
283       </para>
284     </refsect3>
286     <refsect3>
287       <title>req_control</title>
288       <para>
289         Number of REQ_CONTROL messages from the clients.
290       </para>
291     </refsect3>
293     <refsect3>
294       <title>req_tunnel</title>
295       <para>
296         Number of REQ_TUNNEL messages from the clients.
297       </para>
298     </refsect3>
300     </refsect2>
302     <refsect2>
303       <title>timeouts</title>
304       <para>
305         This section lists timeouts occurred when sending various messages.
306       </para>
308     <refsect3>
309       <title>call</title>
310       <para>
311         Number of timeouts for REQ_CALL messages.
312       </para>
313     </refsect3>
315     <refsect3>
316       <title>control</title>
317       <para>
318         Number of timeouts for REQ_CONTROL messages.
319       </para>
320     </refsect3>
322     <refsect3>
323       <title>traverse</title>
324       <para>
325         Number of timeouts for database traverse operations.
326       </para>
327     </refsect3>
328     </refsect2>
330     <refsect2>
331       <title>locks</title>
332       <para>
333         This section lists locking statistics.
334       </para>
336     <refsect3>
337       <title>num_calls</title>
338       <para>
339         Number of completed lock calls.  This includes database locks
340         and record locks.
341       </para>
342     </refsect3>
344     <refsect3>
345       <title>num_current</title>
346       <para>
347         Number of scheduled lock calls.  This includes database locks
348         and record locks.
349       </para>
350     </refsect3>
352     <refsect3>
353       <title>num_pending</title>
354       <para>
355         Number of queued lock calls.  This includes database locks and
356         record locks.
357       </para>
358     </refsect3>
360     <refsect3>
361       <title>num_failed</title>
362       <para>
363         Number of failed lock calls.  This includes database locks and
364         record locks.
365       </para>
366     </refsect3>
368     </refsect2>
370     <refsect2>
371       <title>total_calls</title>
372       <para>
373         Number of req_call messages processed from clients.  This number
374         should be same as client --> req_call.
375       </para>
376     </refsect2>
378     <refsect2>
379       <title>pending_calls</title>
380       <para>
381         Number of req_call messages which are currently being processed.
382         This number indicates the number of record migrations in flight.
383       </para>
384     </refsect2>
386     <refsect2>
387       <title>childwrite_calls</title>
388       <para>
389         Number of record update calls.  Record update calls are used to
390         update a record under a transaction.
391       </para>
392     </refsect2>
394     <refsect2>
395       <title>pending_childwrite_calls</title>
396       <para>
397         Number of record update calls currently active.
398       </para>
399     </refsect2>
401     <refsect2>
402       <title>memory_used</title>
403       <para>
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
407         databases.
408       </para>
409     </refsect2>
411     <refsect2>
412       <title>max_hop_count</title>
413       <para>
414         The maximum number of hops required for a record migration request
415         to obtain the record.  High numbers indicate record contention.
416       </para>
417     </refsect2>
419     <refsect2>
420       <title>total_ro_delegations</title>
421       <para>
422         Number of readonly delegations created.
423       </para>
424     </refsect2>
426     <refsect2>
427       <title>total_ro_revokes</title>
428       <para>
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.
432       </para>
433     </refsect2>
435     <refsect2>
436       <title>hop_count_buckets</title>
437       <para>
438         Distribution of migration requests based on hop counts values.
439         Buckets are 0, &lt;&nbsp;2, &lt;&nbsp;4, &lt;&nbsp;8,
440         &lt;&nbsp;16, &lt;&nbsp;32, &lt;&nbsp;64, &lt;&nbsp;128,
441         &lt;&nbsp;256, &lt;&nbsp;512, &lt;&nbsp;1024, &lt;&nbsp;2048,
442         &lt;&nbsp;4096, &lt;&nbsp;8192, &lt;&nbsp;16384, &ge;&nbsp;16384.
443       </para>
444     </refsect2>
446     <refsect2>
447       <title>lock_buckets</title>
448       <para>
449         Distribution of record lock requests based on time required to
450         obtain locks.  Buckets are &lt;&nbsp;1ms, &lt;&nbsp;10ms,
451         &lt;&nbsp;100ms, &lt;&nbsp;1s, &lt;&nbsp;2s, &lt;&nbsp;4s,
452         &lt;&nbsp;8s, &lt;&nbsp;16s, &lt;&nbsp;32s, &lt;&nbsp;64s,
453         &ge;&nbsp;64s.
454       </para>
455     </refsect2>
457     <refsect2>
458       <title>locks_latency</title>
459       <para>
460         The minimum, the average and the maximum time (in seconds)
461         required to obtain record locks.
462       </para>
463     </refsect2>
465     <refsect2>
466       <title>reclock_ctdbd</title>
467       <para>
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.
471       </para>
472     </refsect2>
474     <refsect2>
475       <title>reclock_recd</title>
476       <para>
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.
480       </para>
481     </refsect2>
483     <refsect2>
484       <title>call_latency</title>
485       <para>
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.
490       </para>
491     </refsect2>
493     <refsect2>
494       <title>childwrite_latency</title>
495       <para>Default: 0</para>
496       <para>
497         The minimum, the average and the maximum time (in seconds)
498         required to update records under a transaction.
499       </para>
500     </refsect2>
501   </refsect1>
503   <refsect1>
504     <title>DATABASE STATISTICS</title>
506     <para>
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.
511     </para>
513     <refsect2>
514         <title>Example: ctdb dbstatistics notify_index.tdb</title>
515         <screen>
516 DB Statistics: notify_index.tdb
517  ro_delegations                     0
518  ro_revokes                         0
519  locks
520      total                        131
521      failed                         0
522      current                        0
523      pending                        0
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
527  Num Hot Keys:     3
528      Count:7 Key:2f636c75737465726673
529      Count:18 Key:2f636c757374657266732f64617461
530      Count:7 Key:2f636c757374657266732f646174612f636c69656e7473
531         </screen>
532     </refsect2>
534     <refsect2>
535       <title>DB Statistics</title>
536       <para>
537         Name of the database.
538       </para>
539     </refsect2>
541     <refsect2>
542       <title>ro_delegations</title>
543       <para>
544         Number of readonly delegations created in the database.
545       </para>
546     </refsect2>
548     <refsect2>
549       <title>ro_revokes</title>
550       <para>
551         Number of readonly delegations revoked.  The difference in
552         ro_delegations and ro_revokes indicates the currently active
553         readonly delegations.
554       </para>
555     </refsect2>
557     <refsect2>
558       <title>locks</title>
559       <para>
560         This section lists locking statistics.
561       </para>
563     <refsect3>
564       <title>total</title>
565       <para>
566         Number of completed lock calls.  This includes database locks
567         and record locks.
568       </para>
569     </refsect3>
571     <refsect3>
572       <title>failed</title>
573       <para>
574         Number of failed lock calls.  This includes database locks and
575         record locks.
576       </para>
577     </refsect3>
579     <refsect3>
580       <title>current</title>
581       <para>
582         Number of scheduled lock calls.  This includes database locks
583         and record locks.
584       </para>
585     </refsect3>
587     <refsect3>
588       <title>pending</title>
589       <para>
590         Number of queued lock calls.  This includes database locks and
591         record locks.
592       </para>
593     </refsect3>
595     </refsect2>
597     <refsect2>
598       <title>hop_count_buckets</title>
599       <para>
600         Distribution of migration requests based on hop counts values.
601         Buckets are 0, &lt;&nbsp;2, &lt;&nbsp;4, &lt;&nbsp;8,
602         &lt;&nbsp;16, &lt;&nbsp;32, &lt;&nbsp;64, &lt;&nbsp;128,
603         &lt;&nbsp;256, &lt;&nbsp;512, &lt;&nbsp;1024, &lt;&nbsp;2048,
604         &lt;&nbsp;4096, &lt;&nbsp;8192, &lt;&nbsp;16384, &ge;&nbsp;16384.
605       </para>
606     </refsect2>
608     <refsect2>
609       <title>lock_buckets</title>
610       <para>
611         Distribution of record lock requests based on time required to
612         obtain locks.  Buckets are &lt;&nbsp;1ms, &lt;&nbsp;10ms,
613         &lt;&nbsp;100ms, &lt;&nbsp;1s, &lt;&nbsp;2s, &lt;&nbsp;4s,
614         &lt;&nbsp;8s, &lt;&nbsp;16s, &lt;&nbsp;32s, &lt;&nbsp;64s,
615         &ge;&nbsp;64s.
616       </para>
617     </refsect2>
619     <refsect2>
620       <title>locks_latency</title>
621       <para>
622         The minimum, the average and the maximum time (in seconds)
623         required to obtain record locks.
624       </para>
625     </refsect2>
627     <refsect2>
628       <title>Num Hot Keys</title>
629       <para>
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.
633       </para>
634     </refsect2>
635   </refsect1>
637   <refsect1>
638     <title>SEE ALSO</title>
639     <para>
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/"/>
650     </para>
651   </refsect1>
653   <refentryinfo>
654     <author>
655       <contrib>
656         This documentation was written by
657         Amitay Isaacs,
658         Martin Schwenke
659       </contrib>
660     </author>
662     <copyright>
663       <year>2007</year>
664       <holder>Andrew Tridgell</holder>
665       <holder>Ronnie Sahlberg</holder>
666     </copyright>
667     <legalnotice>
668       <para>
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.
673       </para>
674       <para>
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.
679       </para>
680       <para>
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"/>.
684       </para>
685     </legalnotice>
686   </refentryinfo>
688 </refentry>