~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to man/ndb_config.1

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: \fBndb_config\fR
 
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
 
5
.\"      Date: 03/01/2010
 
6
.\"    Manual: MySQL Database System
 
7
.\"    Source: MySQL 5.1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "\FBNDB_CONFIG\FR" "1" "03/01/2010" "MySQL 5\&.1" "MySQL Database System"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.\" ndb_config
 
22
.SH "NAME"
 
23
ndb_config \- extract MySQL Cluster configuration information
 
24
.SH "SYNOPSIS"
 
25
.HP \w'\fBndb_config\ \fR\fB\fIoptions\fR\fR\ 'u
 
26
\fBndb_config \fR\fB\fIoptions\fR\fR
 
27
.SH "DESCRIPTION"
 
28
.PP
 
29
This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from a cluster management node (and possibly its
 
30
config\&.ini
 
31
file)\&. Beginning with MySQL Cluster NDB 6\&.3\&.25 and MySQL Cluster NDB 7\&.0\&.6, it can also provide an offline dump (in text or XML format) of all configuration parameters which can be used, along with their default, maximum, and minimum values and other information (see the discussion of the
 
32
\fB\-\-configinfo\fR
 
33
and
 
34
\fB\-\-xml\fR
 
35
options later in this section)\&.
 
36
.PP
 
37
The following table includes options that are specific to
 
38
\fBndb_config\fR\&. Additional descriptions follow the table\&. For options common to all MySQL Cluster programs, see
 
39
Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&.
 
40
.sp
 
41
.RS 4
 
42
.ie n \{\
 
43
\h'-04'\(bu\h'+03'\c
 
44
.\}
 
45
.el \{\
 
46
.sp -1
 
47
.IP \(bu 2.3
 
48
.\}
 
49
.\" ndb_config: usage option
 
50
.\" usage option: ndb_config
 
51
\fB\-\-usage\fR,
 
52
\fB\-\-help\fR, or
 
53
\fB\-?\fR
 
54
.TS
 
55
allbox tab(:);
 
56
l l s.
 
57
T{
 
58
\fBCommand\-Line Format\fR
 
59
T}:T{
 
60
\-\-help
 
61
T}
 
62
.TE
 
63
.sp 1
 
64
Causes
 
65
\fBndb_config\fR
 
66
to print a list of available options, and then exit\&.
 
67
.RE
 
68
.sp
 
69
.RS 4
 
70
.ie n \{\
 
71
\h'-04'\(bu\h'+03'\c
 
72
.\}
 
73
.el \{\
 
74
.sp -1
 
75
.IP \(bu 2.3
 
76
.\}
 
77
.\" ndb_config: version option
 
78
.\" version option: ndb_config
 
79
\fB\-\-version\fR,
 
80
\fB\-V\fR
 
81
.TS
 
82
allbox tab(:);
 
83
l l s.
 
84
T{
 
85
\fBCommand\-Line Format\fR
 
86
T}:T{
 
87
\-V
 
88
T}
 
89
.TE
 
90
.sp 1
 
91
Causes
 
92
\fBndb_config\fR
 
93
to print a version information string, and then exit\&.
 
94
.RE
 
95
.sp
 
96
.RS 4
 
97
.ie n \{\
 
98
\h'-04'\(bu\h'+03'\c
 
99
.\}
 
100
.el \{\
 
101
.sp -1
 
102
.IP \(bu 2.3
 
103
.\}
 
104
.\" ndb_config: ndb-connectstring option
 
105
.\" ndb-connectstring option: ndb_config
 
106
\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR
 
107
.TS
 
108
allbox tab(:);
 
109
l l s
 
110
l l s
 
111
^ l l
 
112
^ l l.
 
113
T{
 
114
\fBCommand\-Line Format\fR
 
115
T}:T{
 
116
\-\-ndb\-connectstring=name
 
117
T}
 
118
T{
 
119
\ \&
 
120
T}:T{
 
121
\fBPermitted Values \fR
 
122
T}
 
123
:T{
 
124
\fBType\fR
 
125
T}:T{
 
126
string
 
127
T}
 
128
:T{
 
129
\fBDefault\fR
 
130
T}:T{
 
131
localhost:1186
 
132
T}
 
133
.TE
 
134
.sp 1
 
135
Specifies the connectstring to use in connecting to the management server\&. The format for the connectstring is the same as described in
 
136
Section\ \&17.3.2.3, \(lqThe MySQL Cluster Connectstring\(rq, and defaults to
 
137
localhost:1186\&.
 
138
.sp
 
139
The use of
 
140
\fB\-c\fR
 
141
as a short version for this option is supported for
 
142
\fBndb_config\fR
 
143
beginning with MySQL 5\&.1\&.12\&.
 
144
.RE
 
145
.sp
 
146
.RS 4
 
147
.ie n \{\
 
148
\h'-04'\(bu\h'+03'\c
 
149
.\}
 
150
.el \{\
 
151
.sp -1
 
152
.IP \(bu 2.3
 
153
.\}
 
154
.\" ndb_config: config-file option
 
155
.\" config-file option: ndb_config
 
156
\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR
 
157
.sp
 
158
Gives the path to the management server\'s configuration file (config\&.ini)\&. This may be a relative or absolute path\&. If the management node resides on a different host from the one on which
 
159
\fBndb_config\fR
 
160
is invoked, then an absolute path must be used\&.
 
161
.RE
 
162
.sp
 
163
.RS 4
 
164
.ie n \{\
 
165
\h'-04'\(bu\h'+03'\c
 
166
.\}
 
167
.el \{\
 
168
.sp -1
 
169
.IP \(bu 2.3
 
170
.\}
 
171
.\" ndb_config: query option
 
172
.\" query option: ndb_config
 
173
\fB\-\-query=\fR\fB\fIquery\-options\fR\fR,
 
174
\fB\-q\fR
 
175
\fIquery\-options\fR
 
176
.TS
 
177
allbox tab(:);
 
178
l l s
 
179
l l s
 
180
^ l l
 
181
^ l l.
 
182
T{
 
183
\fBCommand\-Line Format\fR
 
184
T}:T{
 
185
\-\-query=string
 
186
T}
 
187
T{
 
188
\ \&
 
189
T}:T{
 
190
\fBPermitted Values \fR
 
191
T}
 
192
:T{
 
193
\fBType\fR
 
194
T}:T{
 
195
string
 
196
T}
 
197
:T{
 
198
\fBDefault\fR
 
199
T}:T{
 
200
T}
 
201
.TE
 
202
.sp 1
 
203
This is a comma\-delimited list of
 
204
query options
 
205
\(em that is, a list of one or more node attributes to be returned\&. These include
 
206
id
 
207
(node ID), type (node type \(em that is,
 
208
ndbd,
 
209
mysqld, or
 
210
ndb_mgmd), and any configuration parameters whose values are to be obtained\&.
 
211
.sp
 
212
For example,
 
213
.\" ndb_config: query option
 
214
.\" query option: ndb_config
 
215
\fB\-\-query=id,type,indexmemory,datamemory\fR
 
216
would return the node ID, node type,
 
217
DataMemory, and
 
218
IndexMemory
 
219
for each node\&.
 
220
.if n \{\
 
221
.sp
 
222
.\}
 
223
.RS 4
 
224
.it 1 an-trap
 
225
.nr an-no-space-flag 1
 
226
.nr an-break-flag 1
 
227
.br
 
228
.ps +1
 
229
\fBNote\fR
 
230
.ps -1
 
231
.br
 
232
If a given parameter is not applicable to a certain type of node, than an empty string is returned for the corresponding value\&. See the examples later in this section for more information\&.
 
233
.sp .5v
 
234
.RE
 
235
.RE
 
236
.sp
 
237
.RS 4
 
238
.ie n \{\
 
239
\h'-04'\(bu\h'+03'\c
 
240
.\}
 
241
.el \{\
 
242
.sp -1
 
243
.IP \(bu 2.3
 
244
.\}
 
245
.\" ndb_config: host option
 
246
.\" host option: ndb_config
 
247
\fB\-\-host=\fR\fB\fIhostname\fR\fR
 
248
.TS
 
249
allbox tab(:);
 
250
l l s
 
251
l l s
 
252
^ l l
 
253
^ l l.
 
254
T{
 
255
\fBCommand\-Line Format\fR
 
256
T}:T{
 
257
\-\-host=name
 
258
T}
 
259
T{
 
260
\ \&
 
261
T}:T{
 
262
\fBPermitted Values \fR
 
263
T}
 
264
:T{
 
265
\fBType\fR
 
266
T}:T{
 
267
string
 
268
T}
 
269
:T{
 
270
\fBDefault\fR
 
271
T}:T{
 
272
T}
 
273
.TE
 
274
.sp 1
 
275
Specifies the host name of the node for which configuration information is to be obtained\&.
 
276
.RE
 
277
.sp
 
278
.RS 4
 
279
.ie n \{\
 
280
\h'-04'\(bu\h'+03'\c
 
281
.\}
 
282
.el \{\
 
283
.sp -1
 
284
.IP \(bu 2.3
 
285
.\}
 
286
.\" ndb_config: id option
 
287
.\" id option: ndb_config
 
288
\fB\-\-id=\fR\fB\fInode_id\fR\fR,
 
289
.\" ndb_config: nodeid option
 
290
.\" nodeid option: ndb_config
 
291
\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR
 
292
.sp
 
293
Used to specify the node ID of the node for which configuration information is to be obtained\&.
 
294
.RE
 
295
.sp
 
296
.RS 4
 
297
.ie n \{\
 
298
\h'-04'\(bu\h'+03'\c
 
299
.\}
 
300
.el \{\
 
301
.sp -1
 
302
.IP \(bu 2.3
 
303
.\}
 
304
.\" ndb_config: nodes option
 
305
.\" nodes option: ndb_config
 
306
\fB\-\-nodes\fR
 
307
.TS
 
308
allbox tab(:);
 
309
l l s
 
310
l l s
 
311
^ l l
 
312
^ l l.
 
313
T{
 
314
\fBCommand\-Line Format\fR
 
315
T}:T{
 
316
\-\-nodes
 
317
T}
 
318
T{
 
319
\ \&
 
320
T}:T{
 
321
\fBPermitted Values \fR
 
322
T}
 
323
:T{
 
324
\fBType\fR
 
325
T}:T{
 
326
boolean
 
327
T}
 
328
:T{
 
329
\fBDefault\fR
 
330
T}:T{
 
331
FALSE
 
332
T}
 
333
.TE
 
334
.sp 1
 
335
(Tells
 
336
\fBndb_config\fR
 
337
to print information from parameters defined in
 
338
[ndbd]
 
339
sections only\&. Currently, using this option has no affect, since these are the only values checked, but it may become possible in future to query parameters set in
 
340
[tcp]
 
341
and other sections of cluster configuration files\&.)
 
342
.RE
 
343
.sp
 
344
.RS 4
 
345
.ie n \{\
 
346
\h'-04'\(bu\h'+03'\c
 
347
.\}
 
348
.el \{\
 
349
.sp -1
 
350
.IP \(bu 2.3
 
351
.\}
 
352
.\" ndb_config: type option
 
353
.\" type option: ndb_config
 
354
\fB\-\-type=\fR\fB\fInode_type\fR\fR
 
355
.TS
 
356
allbox tab(:);
 
357
l l s
 
358
l l s
 
359
^ l l
 
360
^ l l
 
361
^ l l.
 
362
T{
 
363
\fBCommand\-Line Format\fR
 
364
T}:T{
 
365
\-\-type=name
 
366
T}
 
367
T{
 
368
\ \&
 
369
T}:T{
 
370
\fBPermitted Values \fR
 
371
T}
 
372
:T{
 
373
\fBType\fR
 
374
T}:T{
 
375
enumeration
 
376
T}
 
377
:T{
 
378
\fBDefault\fR
 
379
T}:T{
 
380
T}
 
381
:T{
 
382
\fBValid Values\fR
 
383
T}:T{
 
384
ndbd, mysqld, ndb_mgmd
 
385
T}
 
386
.TE
 
387
.sp 1
 
388
Filters results so that only configuration values applying to nodes of the specified
 
389
\fInode_type\fR
 
390
(ndbd,
 
391
mysqld, or
 
392
ndb_mgmd) are returned\&.
 
393
.RE
 
394
.sp
 
395
.RS 4
 
396
.ie n \{\
 
397
\h'-04'\(bu\h'+03'\c
 
398
.\}
 
399
.el \{\
 
400
.sp -1
 
401
.IP \(bu 2.3
 
402
.\}
 
403
.\" ndb_config: fields option
 
404
.\" fields option: ndb_config
 
405
\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR,
 
406
\fB\-f\fR
 
407
\fIdelimiter\fR
 
408
.TS
 
409
allbox tab(:);
 
410
l l s
 
411
l l s
 
412
^ l l
 
413
^ l l.
 
414
T{
 
415
\fBCommand\-Line Format\fR
 
416
T}:T{
 
417
\-\-fields=string
 
418
T}
 
419
T{
 
420
\ \&
 
421
T}:T{
 
422
\fBPermitted Values \fR
 
423
T}
 
424
:T{
 
425
\fBType\fR
 
426
T}:T{
 
427
string
 
428
T}
 
429
:T{
 
430
\fBDefault\fR
 
431
T}:T{
 
432
T}
 
433
.TE
 
434
.sp 1
 
435
Specifies a
 
436
\fIdelimiter\fR
 
437
string used to separate the fields in the result\&. The default is
 
438
\(lq,\(rq
 
439
(the comma character)\&.
 
440
.if n \{\
 
441
.sp
 
442
.\}
 
443
.RS 4
 
444
.it 1 an-trap
 
445
.nr an-no-space-flag 1
 
446
.nr an-break-flag 1
 
447
.br
 
448
.ps +1
 
449
\fBNote\fR
 
450
.ps -1
 
451
.br
 
452
If the
 
453
\fIdelimiter\fR
 
454
contains spaces or escapes (such as
 
455
\en
 
456
for the linefeed character), then it must be quoted\&.
 
457
.sp .5v
 
458
.RE
 
459
.RE
 
460
.sp
 
461
.RS 4
 
462
.ie n \{\
 
463
\h'-04'\(bu\h'+03'\c
 
464
.\}
 
465
.el \{\
 
466
.sp -1
 
467
.IP \(bu 2.3
 
468
.\}
 
469
.\" ndb_config: rows option
 
470
.\" rows option: ndb_config
 
471
\fB\-\-rows=\fR\fB\fIseparator\fR\fR,
 
472
\fB\-r\fR
 
473
\fIseparator\fR
 
474
.TS
 
475
allbox tab(:);
 
476
l l s
 
477
l l s
 
478
^ l l
 
479
^ l l.
 
480
T{
 
481
\fBCommand\-Line Format\fR
 
482
T}:T{
 
483
\-\-rows=string
 
484
T}
 
485
T{
 
486
\ \&
 
487
T}:T{
 
488
\fBPermitted Values \fR
 
489
T}
 
490
:T{
 
491
\fBType\fR
 
492
T}:T{
 
493
string
 
494
T}
 
495
:T{
 
496
\fBDefault\fR
 
497
T}:T{
 
498
T}
 
499
.TE
 
500
.sp 1
 
501
Specifies a
 
502
\fIseparator\fR
 
503
string used to separate the rows in the result\&. The default is a space character\&.
 
504
.if n \{\
 
505
.sp
 
506
.\}
 
507
.RS 4
 
508
.it 1 an-trap
 
509
.nr an-no-space-flag 1
 
510
.nr an-break-flag 1
 
511
.br
 
512
.ps +1
 
513
\fBNote\fR
 
514
.ps -1
 
515
.br
 
516
If the
 
517
\fIseparator\fR
 
518
contains spaces or escapes (such as
 
519
\en
 
520
for the linefeed character), then it must be quoted\&.
 
521
.sp .5v
 
522
.RE
 
523
.RE
 
524
.sp
 
525
.RS 4
 
526
.ie n \{\
 
527
\h'-04'\(bu\h'+03'\c
 
528
.\}
 
529
.el \{\
 
530
.sp -1
 
531
.IP \(bu 2.3
 
532
.\}
 
533
.\" ndb_config: configinfo option
 
534
.\" configinfo option: ndb_config
 
535
\fB\-\-configinfo\fR
 
536
.sp
 
537
The
 
538
\fB\-\-configinfo\fR
 
539
option, added in MySQL Cluster NDB 6\&.3\&.25 and MySQL Cluster NDB 7\&.0\&.6, causes
 
540
\fBndb_config\fR
 
541
to dump a list of each MySQL Cluster configuration parameter supported by the MySQL Cluster distribution of which
 
542
\fBndb_config\fR
 
543
is a part, including the following information:
 
544
.sp
 
545
.RS 4
 
546
.ie n \{\
 
547
\h'-04'\(bu\h'+03'\c
 
548
.\}
 
549
.el \{\
 
550
.sp -1
 
551
.IP \(bu 2.3
 
552
.\}
 
553
A brief description of each parameter\'s purpose, effects, and usage
 
554
.RE
 
555
.sp
 
556
.RS 4
 
557
.ie n \{\
 
558
\h'-04'\(bu\h'+03'\c
 
559
.\}
 
560
.el \{\
 
561
.sp -1
 
562
.IP \(bu 2.3
 
563
.\}
 
564
The section of the
 
565
config\&.ini
 
566
file where the parameter may be used
 
567
.RE
 
568
.sp
 
569
.RS 4
 
570
.ie n \{\
 
571
\h'-04'\(bu\h'+03'\c
 
572
.\}
 
573
.el \{\
 
574
.sp -1
 
575
.IP \(bu 2.3
 
576
.\}
 
577
The parameter\'s data type or unit of measurement
 
578
.RE
 
579
.sp
 
580
.RS 4
 
581
.ie n \{\
 
582
\h'-04'\(bu\h'+03'\c
 
583
.\}
 
584
.el \{\
 
585
.sp -1
 
586
.IP \(bu 2.3
 
587
.\}
 
588
Where applicable, the parameter\'s default, minimum, and maximum values
 
589
.RE
 
590
.sp
 
591
.RS 4
 
592
.ie n \{\
 
593
\h'-04'\(bu\h'+03'\c
 
594
.\}
 
595
.el \{\
 
596
.sp -1
 
597
.IP \(bu 2.3
 
598
.\}
 
599
A brief description of the parameter\'s purpose, effects, and usage
 
600
.RE
 
601
.sp
 
602
.RS 4
 
603
.ie n \{\
 
604
\h'-04'\(bu\h'+03'\c
 
605
.\}
 
606
.el \{\
 
607
.sp -1
 
608
.IP \(bu 2.3
 
609
.\}
 
610
MySQL Cluster release version and build information
 
611
.RE
 
612
.RS 4
 
613
By default, this output is in text format\&. Part of this output is shown here:
 
614
.sp
 
615
.if n \{\
 
616
.RS 4
 
617
.\}
 
618
.nf
 
619
shell> \fBndb_config \-\-configinfo\fR
 
620
****** SYSTEM ******
 
621
Name (String)
 
622
Name of system (NDB Cluster)
 
623
MANDATORY
 
624
PrimaryMGMNode (Non\-negative Integer)
 
625
Node id of Primary ndb_mgmd(MGM) node
 
626
Default: 0 (Min: 0, Max: 4294967039)
 
627
ConfigGenerationNumber (Non\-negative Integer)
 
628
Configuration generation number
 
629
Default: 0 (Min: 0, Max: 4294967039)
 
630
****** DB ******
 
631
MaxNoOfSubscriptions (Non\-negative Integer)
 
632
Max no of subscriptions (default 0 == MaxNoOfTables)
 
633
Default: 0 (Min: 0, Max: 4294967039)
 
634
MaxNoOfSubscribers (Non\-negative Integer)
 
635
Max no of subscribers (default 0 == 2 * MaxNoOfTables)
 
636
Default: 0 (Min: 0, Max: 4294967039)
 
637
\&...
 
638
.fi
 
639
.if n \{\
 
640
.RE
 
641
.\}
 
642
.sp
 
643
.\" ndb_config: xml option
 
644
.\" xml option: ndb_config
 
645
\fB\-\-configinfo\fR
 
646
\fB\-\-xml\fR
 
647
.TS
 
648
allbox tab(:);
 
649
l l s
 
650
l l s
 
651
l l s
 
652
^ l l
 
653
^ l l.
 
654
T{
 
655
\fBVersion Introduced\fR
 
656
T}:T{
 
657
5\&.1\&.34\-ndb\-7\&.0\&.6
 
658
T}
 
659
T{
 
660
\fBCommand\-Line Format\fR
 
661
T}:T{
 
662
\-\-configinfo \-\-xml
 
663
T}
 
664
T{
 
665
\ \&
 
666
T}:T{
 
667
\fBPermitted Values \fR
 
668
T}
 
669
:T{
 
670
\fBType\fR
 
671
T}:T{
 
672
boolean
 
673
T}
 
674
:T{
 
675
\fBDefault\fR
 
676
T}:T{
 
677
false
 
678
T}
 
679
.TE
 
680
.sp 1
 
681
You can obtain the output of
 
682
\fBndb_config\fR
 
683
\fB\-\-configinfo\fR
 
684
as XML by adding the
 
685
\fB\-\-xml\fR
 
686
option (like the
 
687
\fB\-\-configinfo\fR
 
688
option, available beginning with MySQL Cluster NDB 6\&.3\&.25 and MySQL Cluster NDB 7\&.0\&.6)\&. A portion of the resulting output is shown in this example:
 
689
.sp
 
690
.if n \{\
 
691
.RS 4
 
692
.\}
 
693
.nf
 
694
shell> \fBndb_config \-\-configinfo \-\-xml\fR
 
695
<configvariables protocolversion="1" ndbversionstring="mysql\-5\&.1\&.34 ndb\-7\&.0\&.6"
 
696
                    ndbversion="458758" ndbversionmajor="7" ndbversionminor="0"
 
697
                    ndbversionbuild="6">
 
698
  <section name="SYSTEM">
 
699
    <param name="Name" comment="Name of system (NDB Cluster)" type="string"
 
700
              mandatory="true"/>
 
701
    <param name="PrimaryMGMNode" comment="Node id of Primary ndb_mgmd(MGM) node"
 
702
              type="unsigned" default="0" min="0" max="4294967039"/>
 
703
    <param name="ConfigGenerationNumber" comment="Configuration generation number"
 
704
              type="unsigned" default="0" min="0" max="4294967039"/>
 
705
  </section>
 
706
  <section name="NDBD">
 
707
    <param name="MaxNoOfSubscriptions" comment="Max no of subscriptions (default 0 == MaxNoOfTables)"
 
708
              type="unsigned" default="0" min="0" max="4294967039"/>
 
709
    <param name="MaxNoOfSubscribers" comment="Max no of subscribers (default 0 == 2 * MaxNoOfTables)"
 
710
              type="unsigned" default="0" min="0" max="4294967039"/>
 
711
    \&...
 
712
  </section>
 
713
  \&...
 
714
</configvariables>
 
715
.fi
 
716
.if n \{\
 
717
.RE
 
718
.\}
 
719
.sp
 
720
.if n \{\
 
721
.sp
 
722
.\}
 
723
.RS 4
 
724
.it 1 an-trap
 
725
.nr an-no-space-flag 1
 
726
.nr an-break-flag 1
 
727
.br
 
728
.ps +1
 
729
\fBNote\fR
 
730
.ps -1
 
731
.br
 
732
Normally, the XML output produced by
 
733
\fBndb_config\fR
 
734
\fB\-\-configinfo\fR
 
735
\fB\-\-xml\fR
 
736
is formatted using one line per element; we have added extra whitespace in the previous example, as well as the next one, for reasons of legibility\&. This should not make any difference to applications using this output, since most XML processors either ignore nonessential whitespace as a matter of course, or can be instructed to do so\&.
 
737
.sp .5v
 
738
.RE
 
739
Beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10, the XML output also indicates when changing a given parameter requires that nodes be restarted using the
 
740
\fB\-\-initial\fR
 
741
option\&. This is shown by the presence of an
 
742
initial="true"
 
743
attribute in the corresponding
 
744
<param>
 
745
element\&. In addition (also beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10), the restart type (system
 
746
or
 
747
node) is also shown; if a given parameter requires a system restart, this is indicated by the presence of a
 
748
restart="system"
 
749
attribute in the corresponding
 
750
<param>
 
751
element\&. For example, the
 
752
Diskless
 
753
parameter requires a system initial restart, as shown here (with the
 
754
restart
 
755
and
 
756
initial
 
757
attributes highlighted for visibility):
 
758
.sp
 
759
.if n \{\
 
760
.RS 4
 
761
.\}
 
762
.nf
 
763
<param name="Diskless" comment="Run wo/ disk" type="bool" default="false" 
 
764
          \fIrestart="system" initial="true"\fR/>
 
765
.fi
 
766
.if n \{\
 
767
.RE
 
768
.\}
 
769
.sp
 
770
Currently, no
 
771
initial
 
772
attribute is included in the XML output for
 
773
<param>
 
774
elements corresponding to parameters which do not require initial restarts; in other words,
 
775
initial="false"
 
776
is the default, and the value
 
777
false
 
778
should be assumed if the attribute is not present\&. Similarly, the default restart type is
 
779
node
 
780
(that is, an online or
 
781
\(lqrolling\(rq
 
782
restart of the cluster), but the
 
783
restart
 
784
attribute is included only if the restart type is
 
785
system
 
786
(meaning that all cluster nodes must be shut down at the same time, then restarted)\&.
 
787
.if n \{\
 
788
.sp
 
789
.\}
 
790
.RS 4
 
791
.it 1 an-trap
 
792
.nr an-no-space-flag 1
 
793
.nr an-break-flag 1
 
794
.br
 
795
.ps +1
 
796
\fBImportant\fR
 
797
.ps -1
 
798
.br
 
799
The
 
800
\fB\-\-xml\fR
 
801
option can be used only with the
 
802
\fB\-\-configinfo\fR
 
803
option\&. Using
 
804
\fB\-\-xml\fR
 
805
without
 
806
\fB\-\-configinfo\fR
 
807
fails with an error\&.
 
808
.sp .5v
 
809
.RE
 
810
Unlike the options used with this program to obtain current configuration data,
 
811
\fB\-\-configinfo\fR
 
812
and
 
813
\fB\-\-xml\fR
 
814
use information obtained from the MySQL Cluster sources when
 
815
\fBndb_config\fR
 
816
was compiled\&. For this reason, no connection to a running MySQL Cluster or access to a
 
817
config\&.ini
 
818
or
 
819
my\&.cnf
 
820
file is required for these two options\&.
 
821
.sp
 
822
Combining other
 
823
\fBndb_config\fR
 
824
options (such as
 
825
\fB\-\-query\fR
 
826
or
 
827
\fB\-\-type\fR) with
 
828
\fB\-\-configinfo\fR
 
829
or
 
830
\fB\-\-xml\fR
 
831
is not supported\&. If you attempt to do so, the usual (current) result is that all other options besides
 
832
\fB\-\-configinfo\fR
 
833
or
 
834
\fB\-\-xml\fR
 
835
are simply ignored\&. However, this behavior is not guaranteed and is subject to change at any time\&. In addition, since
 
836
\fBndb_config\fR
 
837
when used with the
 
838
\fB\-\-configinfo\fR
 
839
option does not access the MySQL Cluster or read any files, trying to specify additional options such as
 
840
\fB\-\-ndb\-connectstring\fR
 
841
or
 
842
\fB\-\-config\-file\fR
 
843
with
 
844
\fB\-\-configinfo\fR
 
845
serves no purpose\&.
 
846
.RE
 
847
.PP
 
848
\fBExamples\fR:
 
849
.sp
 
850
.RS 4
 
851
.ie n \{\
 
852
\h'-04' 1.\h'+01'\c
 
853
.\}
 
854
.el \{\
 
855
.sp -1
 
856
.IP "  1." 4.2
 
857
.\}
 
858
To obtain the node ID and type of each node in the cluster:
 
859
.sp
 
860
.if n \{\
 
861
.RS 4
 
862
.\}
 
863
.nf
 
864
shell> \fB\&./ndb_config \-\-query=id,type \-\-fields=\':\' \-\-rows=\'\en\'\fR
 
865
1:ndbd
 
866
2:ndbd
 
867
3:ndbd
 
868
4:ndbd
 
869
5:ndb_mgmd
 
870
6:mysqld
 
871
7:mysqld
 
872
8:mysqld
 
873
9:mysqld
 
874
.fi
 
875
.if n \{\
 
876
.RE
 
877
.\}
 
878
.sp
 
879
In this example, we used the
 
880
\fB\-\-fields\fR
 
881
options to separate the ID and type of each node with a colon character (:), and the
 
882
\fB\-\-rows\fR
 
883
options to place the values for each node on a new line in the output\&.
 
884
.RE
 
885
.sp
 
886
.RS 4
 
887
.ie n \{\
 
888
\h'-04' 2.\h'+01'\c
 
889
.\}
 
890
.el \{\
 
891
.sp -1
 
892
.IP "  2." 4.2
 
893
.\}
 
894
To produce a connectstring that can be used by data, SQL, and API nodes to connect to the management server:
 
895
.sp
 
896
.if n \{\
 
897
.RS 4
 
898
.\}
 
899
.nf
 
900
shell> \fB\&./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config\&.ini \-\-query=hostname,portnumber \-\-fields=: \-\-rows=, \-\-type=ndb_mgmd\fR
 
901
192\&.168\&.0\&.179:1186
 
902
.fi
 
903
.if n \{\
 
904
.RE
 
905
.\}
 
906
.RE
 
907
.sp
 
908
.RS 4
 
909
.ie n \{\
 
910
\h'-04' 3.\h'+01'\c
 
911
.\}
 
912
.el \{\
 
913
.sp -1
 
914
.IP "  3." 4.2
 
915
.\}
 
916
This invocation of
 
917
\fBndb_config\fR
 
918
checks only data nodes (using the
 
919
\fB\-\-type\fR
 
920
option), and shows the values for each node\'s ID and host name, and its
 
921
DataMemory,
 
922
IndexMemory, and
 
923
DataDir
 
924
parameters:
 
925
.sp
 
926
.if n \{\
 
927
.RS 4
 
928
.\}
 
929
.nf
 
930
shell> \fB\&./ndb_config \-\-type=ndbd \-\-query=id,host,datamemory,indexmemory,datadir \-f \' : \' \-r \'\en\'\fR
 
931
1 : 192\&.168\&.0\&.193 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
 
932
2 : 192\&.168\&.0\&.112 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
 
933
3 : 192\&.168\&.0\&.176 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
 
934
4 : 192\&.168\&.0\&.119 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
 
935
.fi
 
936
.if n \{\
 
937
.RE
 
938
.\}
 
939
.sp
 
940
In this example, we used the short options
 
941
\fB\-f\fR
 
942
and
 
943
\fB\-r\fR
 
944
for setting the field delimiter and row separator, respectively\&.
 
945
.RE
 
946
.sp
 
947
.RS 4
 
948
.ie n \{\
 
949
\h'-04' 4.\h'+01'\c
 
950
.\}
 
951
.el \{\
 
952
.sp -1
 
953
.IP "  4." 4.2
 
954
.\}
 
955
To exclude results from any host except one in particular, use the
 
956
\fB\-\-host\fR
 
957
option:
 
958
.sp
 
959
.if n \{\
 
960
.RS 4
 
961
.\}
 
962
.nf
 
963
shell> \fB\&./ndb_config \-\-host=192\&.168\&.0\&.176 \-f : \-r \'\en\' \-q id,type\fR
 
964
3:ndbd
 
965
5:ndb_mgmd
 
966
.fi
 
967
.if n \{\
 
968
.RE
 
969
.\}
 
970
.sp
 
971
In this example, we also used the short form
 
972
\fB\-q\fR
 
973
to determine the attributes to be queried\&.
 
974
.sp
 
975
Similarly, you can limit results to a node with a specific ID using the
 
976
\fB\-\-id\fR
 
977
or
 
978
\fB\-\-nodeid\fR
 
979
option\&.
 
980
.RE
 
981
.SH "COPYRIGHT"
 
982
.br
 
983
.PP
 
984
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
 
985
.PP
 
986
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 
987
.PP
 
988
This documentation 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.
 
989
.PP
 
990
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
 
991
.sp
 
992
.SH "SEE ALSO"
 
993
For more information, please refer to the MySQL Reference Manual,
 
994
which may already be installed locally and which is also available
 
995
online at http://dev.mysql.com/doc/.
 
996
.SH AUTHOR
 
997
Sun Microsystems, Inc. (http://www.mysql.com/).