1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb-statistics</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ctdb-statistics.7"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb-statistics — CTDB statistics output</p></div><div class="refsect1"><a name="idm140666373839840"></a><h2>OVERALL STATISTICS</h2><p>
CTDB maintains information about various messages communicated
and some of the important operations per node. See the
<span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span> commands
<span class="command"><strong>statistics</strong></span> and <span class="command"><strong>statisticsreset</strong></span>
for displaying statistics.
</p><div class="refsect2"><a name="idm140666374220368"></a><h3>Example: ctdb statistics</h3><pre class="screen">
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
</pre></div><div class="refsect2"><a name="idm140666375057808"></a><h3>CTDB version</h3><p>
Version of the ctdb protocol used by the node.
</p></div><div class="refsect2"><a name="idm140666374150640"></a><h3>Current time of statistics</h3><p>
Time when the statistics are generated.
</p><p>
This is useful when collecting statistics output periodically
for post-processing.
</p></div><div class="refsect2"><a name="idm140666374141344"></a><h3>Statistics collected since</h3><p>
Time when ctdb was started or the last time statistics was reset.
The output shows the duration and the timestamp.
</p></div><div class="refsect2"><a name="idm140666373448288"></a><h3>num_clients</h3><p>
Number of processes currently connected to CTDB's unix socket.
This includes recovery daemon, ctdb tool and samba processes
(smbd, winbindd).
</p></div><div class="refsect2"><a name="idm140666374417952"></a><h3>frozen</h3><p>
1 if the the databases are currently frozen, 0 otherwise.
</p></div><div class="refsect2"><a name="idm140666374901792"></a><h3>recovering</h3><p>
1 if recovery is active, 0 otherwise.
</p></div><div class="refsect2"><a name="idm140666372401632"></a><h3>num_recoveries</h3><p>
Number of recoveries since the start of ctdb or since the last
statistics reset.
</p></div><div class="refsect2"><a name="idm140666372037280"></a><h3>client_packets_sent</h3><p>
Number of packets sent to client processes via unix domain socket.
</p></div><div class="refsect2"><a name="idm140666376537440"></a><h3>client_packets_recv</h3><p>
Number of packets received from client processes via unix domain socket.
</p></div><div class="refsect2"><a name="idm140666376536256"></a><h3>node_packets_sent</h3><p>
Number of packets sent to the other nodes in the cluster via TCP.
</p></div><div class="refsect2"><a name="idm140666376535072"></a><h3>node_packets_recv</h3><p>
Number of packets received from the other nodes in the cluster via TCP.
</p></div><div class="refsect2"><a name="idm140666376570736"></a><h3>keepalive_packets_sent</h3><p>
Number of keepalive messages sent to other nodes.
</p><p>
CTDB periodically sends keepalive messages to other nodes.
See <em class="citetitle">KeepaliveInterval</em> tunable in
<span class="citerefentry"><span class="refentrytitle">ctdb-tunables</span>(7)</span> for more details.
</p></div><div class="refsect2"><a name="idm140666376567744"></a><h3>keepalive_packets_recv</h3><p>
Number of keepalive messages received from other nodes.
</p></div><div class="refsect2"><a name="idm140666376566560"></a><h3>node</h3><p>
This section lists various types of messages processed which
originated from other nodes via TCP.
</p><div class="refsect3"><a name="idm140666376565376"></a><h4>req_call</h4><p>
Number of REQ_CALL messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376564192"></a><h4>reply_call</h4><p>
Number of REPLY_CALL messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376563008"></a><h4>req_dmaster</h4><p>
Number of REQ_DMASTER messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376561744"></a><h4>reply_dmaster</h4><p>
Number of REPLY_DMASTER messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376560480"></a><h4>reply_error</h4><p>
Number of REPLY_ERROR messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376559216"></a><h4>req_message</h4><p>
Number of REQ_MESSAGE messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376557952"></a><h4>req_control</h4><p>
Number of REQ_CONTROL messages from the other nodes.
</p></div><div class="refsect3"><a name="idm140666376556688"></a><h4>reply_control</h4><p>
Number of REPLY_CONTROL messages from the other nodes.
</p></div></div><div class="refsect2"><a name="idm140666371934400"></a><h3>client</h3><p>
This section lists various types of messages processed which
originated from clients via unix domain socket.
</p><div class="refsect3"><a name="idm140666371933248"></a><h4>req_call</h4><p>
Number of REQ_CALL messages from the clients.
</p></div><div class="refsect3"><a name="idm140666371931984"></a><h4>req_message</h4><p>
Number of REQ_MESSAGE messages from the clients.
</p></div><div class="refsect3"><a name="idm140666371930720"></a><h4>req_control</h4><p>
Number of REQ_CONTROL messages from the clients.
</p></div></div><div class="refsect2"><a name="idm140666371929328"></a><h3>timeouts</h3><p>
This section lists timeouts occurred when sending various messages.
</p><div class="refsect3"><a name="idm140666371928272"></a><h4>call</h4><p>
Number of timeouts for REQ_CALL messages.
</p></div><div class="refsect3"><a name="idm140666371927008"></a><h4>control</h4><p>
Number of timeouts for REQ_CONTROL messages.
</p></div><div class="refsect3"><a name="idm140666371925744"></a><h4>traverse</h4><p>
Number of timeouts for database traverse operations.
</p></div></div><div class="refsect2"><a name="idm140666371924352"></a><h3>locks</h3><p>
This section lists locking statistics.
</p><div class="refsect3"><a name="idm140666371923296"></a><h4>num_calls</h4><p>
Number of completed lock calls. This includes database locks
and record locks.
</p></div><div class="refsect3"><a name="idm140666371922000"></a><h4>num_current</h4><p>
Number of scheduled lock calls. This includes database locks
and record locks.
</p></div><div class="refsect3"><a name="idm140666371920704"></a><h4>num_pending</h4><p>
Number of queued lock calls. This includes database locks and
record locks.
</p></div><div class="refsect3"><a name="idm140666371919408"></a><h4>num_failed</h4><p>
Number of failed lock calls. This includes database locks and
record locks.
</p></div></div><div class="refsect2"><a name="idm140666376596000"></a><h3>total_calls</h3><p>
Number of req_call messages processed from clients. This number
should be same as client --> req_call.
</p></div><div class="refsect2"><a name="idm140666376594688"></a><h3>pending_calls</h3><p>
Number of req_call messages which are currenly being processed.
This number indicates the number of record migrations in flight.
</p></div><div class="refsect2"><a name="idm140666376593344"></a><h3>childwrite_calls</h3><p>
Number of record update calls. Record update calls are used to
update a record under a transaction.
</p></div><div class="refsect2"><a name="idm140666376592032"></a><h3>pending_childwrite_calls</h3><p>
Number of record update calls currently active.
</p></div><div class="refsect2"><a name="idm140666376590752"></a><h3>memory_used</h3><p>
The amount of memory in bytes currently used by CTDB using
talloc. This includes all the memory used for CTDB's internal
data structures. This does not include the memory mapped TDB
databases.
</p></div><div class="refsect2"><a name="idm140666376589344"></a><h3>max_hop_count</h3><p>
The maximum number of hops required for a record migration request
to obtain the record. High numbers indicate record contention.
</p></div><div class="refsect2"><a name="idm140666376588000"></a><h3>total_ro_delegations</h3><p>
Number of readonly delegations created.
</p></div><div class="refsect2"><a name="idm140666376586816"></a><h3>total_ro_revokes</h3><p>
Number of readonly delegations that were revoked. The difference
between total_ro_revokes and total_ro_delegations gives the
number of currently active readonly delegations.
</p></div><div class="refsect2"><a name="idm140666376585424"></a><h3>hop_count_buckets</h3><p>
Distribution of migration requests based on hop counts values.
Buckets are 1, < 4, < 8, < 16, < 32, < 64, <
128, < 256, < 512, ≥ 512.
</p></div><div class="refsect2"><a name="idm140666376584160"></a><h3>lock_buckets</h3><p>
Distribution of record lock requests based on time required to
obtain locks. Buckets are < 1ms, < 10ms, < 100ms,
< 1s, < 2s, < 4s, < 8s, < 16s, < 32s, <
64s, ≥ 64s.
</p></div><div class="refsect2"><a name="idm140666376582272"></a><h3>locks_latency</h3><p>
The minimum, the average and the maximum time (in seconds)
required to obtain record locks.
</p></div><div class="refsect2"><a name="idm140666376581120"></a><h3>reclock_ctdbd</h3><p>
The minimum, the average and the maximum time (in seconds)
required to check if recovery lock is still held by recovery
daemon when recovery mode is changed. This check is done in ctdb daemon.
</p></div><div class="refsect2"><a name="idm140666376579744"></a><h3>reclock_recd</h3><p>
The minimum, the average and the maximum time (in seconds)
required to check if recovery lock is still held by recovery
daemon during recovery. This check is done in recovery daemon.
</p></div><div class="refsect2"><a name="idm140666376577904"></a><h3>call_latency</h3><p>
The minimum, the average and the maximum time (in seconds) required
to process a REQ_CALL message from client. This includes the time
required to migrate a record from remote node, if the record is
not available on the local node.
</p></div><div class="refsect2"><a name="idm140666376576464"></a><h3>childwrite_latency</h3><p>Default: 0</p><p>
The minimum, the average and the maximum time (in seconds)
required to update records under a transaction.
</p></div></div><div class="refsect1"><a name="idm140666376574608"></a><h2>DATABASE STATISTICS</h2><p>
CTDB maintains per database statistics about important operations.
See the <span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span> command
<span class="command"><strong>dbstatistics</strong></span> for displaying database statistics.
</p><div class="refsect2"><a name="idm140666371101504"></a><h3>Example: ctdb dbstatistics notify_index.tdb</h3><pre class="screen">
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
</pre></div><div class="refsect2"><a name="idm140666371099472"></a><h3>DB Statistics</h3><p>
Name of the database.
</p></div><div class="refsect2"><a name="idm140666371098320"></a><h3>ro_delegations</h3><p>
Number of readonly delegations created in the database.
</p></div><div class="refsect2"><a name="idm140666371097168"></a><h3>ro_revokes</h3><p>
Number of readonly delegations revoked. The difference in
ro_delegations and ro_revokes indicates the currently active
readonly delegations.
</p></div><div class="refsect2"><a name="idm140666371095840"></a><h3>locks</h3><p>
This section lists locking statistics.
</p><div class="refsect3"><a name="idm140666371094816"></a><h4>total</h4><p>
Number of completed lock calls. This includes database locks
and record locks.
</p></div><div class="refsect3"><a name="idm140666371093552"></a><h4>failed</h4><p>
Number of failed lock calls. This includes database locks and
record locks.
</p></div><div class="refsect3"><a name="idm140666371092288"></a><h4>current</h4><p>
Number of scheduled lock calls. This includes database locks
and record locks.
</p></div><div class="refsect3"><a name="idm140666371091024"></a><h4>pending</h4><p>
Number of queued lock calls. This includes database locks and
record locks.
</p></div></div><div class="refsect2"><a name="idm140666371089632"></a><h3>hop_count_buckets</h3><p>
Distribution of migration requests based on hop counts values.
Buckets are 1, < 4, < 8, < 16, < 32, < 64, <
128, < 256, < 512, ≥ 512.
</p></div><div class="refsect2"><a name="idm140666371088272"></a><h3>lock_buckets</h3><p>
Distribution of record lock requests based on time required to
obtain locks. Buckets are < 1ms, < 10ms, < 100ms,
< 1s, < 2s, < 4s, < 8s, < 16s, < 32s, <
64s, ≥ 64s.
</p></div><div class="refsect2"><a name="idm140666371086848"></a><h3>locks_latency</h3><p>
The minimum, the average and the maximum time (in seconds)
required to obtain record locks.
</p></div><div class="refsect2"><a name="idm140666371085584"></a><h3>Num Hot Keys</h3><p>
Number of contended records determined by hop count. CTDB keeps
track of top 10 hot records and the output shows hex encoded
keys for the hot records.
</p></div></div><div class="refsect1"><a name="idm140666371084112"></a><h2>SEE ALSO</h2><p>
<span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">ctdb-tunables</span>(7)</span>,
<a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
</p></div></div></body></html>
|