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/>
6
.\" Manual: MySQL Database System
10
.TH "\FBNDB_CONFIG\FR" "1" "03/01/2010" "MySQL 5\&.1" "MySQL Database System"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
23
ndb_config \- extract MySQL Cluster configuration information
25
.HP \w'\fBndb_config\ \fR\fB\fIoptions\fR\fR\ 'u
26
\fBndb_config \fR\fB\fIoptions\fR\fR
29
This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from a cluster management node (and possibly its
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
35
options later in this section)\&.
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\&.
49
.\" ndb_config: usage option
50
.\" usage option: ndb_config
58
\fBCommand\-Line Format\fR
66
to print a list of available options, and then exit\&.
77
.\" ndb_config: version option
78
.\" version option: ndb_config
85
\fBCommand\-Line Format\fR
93
to print a version information string, and then exit\&.
104
.\" ndb_config: ndb-connectstring option
105
.\" ndb-connectstring option: ndb_config
106
\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR
114
\fBCommand\-Line Format\fR
116
\-\-ndb\-connectstring=name
121
\fBPermitted Values \fR
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
141
as a short version for this option is supported for
143
beginning with MySQL 5\&.1\&.12\&.
154
.\" ndb_config: config-file option
155
.\" config-file option: ndb_config
156
\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR
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
160
is invoked, then an absolute path must be used\&.
171
.\" ndb_config: query option
172
.\" query option: ndb_config
173
\fB\-\-query=\fR\fB\fIquery\-options\fR\fR,
183
\fBCommand\-Line Format\fR
190
\fBPermitted Values \fR
203
This is a comma\-delimited list of
205
\(em that is, a list of one or more node attributes to be returned\&. These include
207
(node ID), type (node type \(em that is,
210
ndb_mgmd), and any configuration parameters whose values are to be obtained\&.
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,
225
.nr an-no-space-flag 1
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\&.
245
.\" ndb_config: host option
246
.\" host option: ndb_config
247
\fB\-\-host=\fR\fB\fIhostname\fR\fR
255
\fBCommand\-Line Format\fR
262
\fBPermitted Values \fR
275
Specifies the host name of the node for which configuration information is to be obtained\&.
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
293
Used to specify the node ID of the node for which configuration information is to be obtained\&.
304
.\" ndb_config: nodes option
305
.\" nodes option: ndb_config
314
\fBCommand\-Line Format\fR
321
\fBPermitted Values \fR
337
to print information from parameters defined in
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
341
and other sections of cluster configuration files\&.)
352
.\" ndb_config: type option
353
.\" type option: ndb_config
354
\fB\-\-type=\fR\fB\fInode_type\fR\fR
363
\fBCommand\-Line Format\fR
370
\fBPermitted Values \fR
384
ndbd, mysqld, ndb_mgmd
388
Filters results so that only configuration values applying to nodes of the specified
392
ndb_mgmd) are returned\&.
403
.\" ndb_config: fields option
404
.\" fields option: ndb_config
405
\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR,
415
\fBCommand\-Line Format\fR
422
\fBPermitted Values \fR
437
string used to separate the fields in the result\&. The default is
439
(the comma character)\&.
445
.nr an-no-space-flag 1
454
contains spaces or escapes (such as
456
for the linefeed character), then it must be quoted\&.
469
.\" ndb_config: rows option
470
.\" rows option: ndb_config
471
\fB\-\-rows=\fR\fB\fIseparator\fR\fR,
481
\fBCommand\-Line Format\fR
488
\fBPermitted Values \fR
503
string used to separate the rows in the result\&. The default is a space character\&.
509
.nr an-no-space-flag 1
518
contains spaces or escapes (such as
520
for the linefeed character), then it must be quoted\&.
533
.\" ndb_config: configinfo option
534
.\" configinfo option: ndb_config
539
option, added in MySQL Cluster NDB 6\&.3\&.25 and MySQL Cluster NDB 7\&.0\&.6, causes
541
to dump a list of each MySQL Cluster configuration parameter supported by the MySQL Cluster distribution of which
543
is a part, including the following information:
553
A brief description of each parameter\'s purpose, effects, and usage
566
file where the parameter may be used
577
The parameter\'s data type or unit of measurement
588
Where applicable, the parameter\'s default, minimum, and maximum values
599
A brief description of the parameter\'s purpose, effects, and usage
610
MySQL Cluster release version and build information
613
By default, this output is in text format\&. Part of this output is shown here:
619
shell> \fBndb_config \-\-configinfo\fR
622
Name of system (NDB Cluster)
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)
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)
643
.\" ndb_config: xml option
644
.\" xml option: ndb_config
655
\fBVersion Introduced\fR
657
5\&.1\&.34\-ndb\-7\&.0\&.6
660
\fBCommand\-Line Format\fR
662
\-\-configinfo \-\-xml
667
\fBPermitted Values \fR
681
You can obtain the output of
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:
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"
698
<section name="SYSTEM">
699
<param name="Name" comment="Name of system (NDB Cluster)" type="string"
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"/>
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"/>
725
.nr an-no-space-flag 1
732
Normally, the XML output produced by
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\&.
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
741
option\&. This is shown by the presence of an
743
attribute in the corresponding
745
element\&. In addition (also beginning with MySQL Cluster NDB 6\&.3\&.29 and MySQL Cluster NDB 7\&.0\&.10), the restart type (system
747
node) is also shown; if a given parameter requires a system restart, this is indicated by the presence of a
749
attribute in the corresponding
751
element\&. For example, the
753
parameter requires a system initial restart, as shown here (with the
757
attributes highlighted for visibility):
763
<param name="Diskless" comment="Run wo/ disk" type="bool" default="false"
764
\fIrestart="system" initial="true"\fR/>
772
attribute is included in the XML output for
774
elements corresponding to parameters which do not require initial restarts; in other words,
776
is the default, and the value
778
should be assumed if the attribute is not present\&. Similarly, the default restart type is
780
(that is, an online or
782
restart of the cluster), but the
784
attribute is included only if the restart type is
786
(meaning that all cluster nodes must be shut down at the same time, then restarted)\&.
792
.nr an-no-space-flag 1
801
option can be used only with the
807
fails with an error\&.
810
Unlike the options used with this program to obtain current configuration data,
814
use information obtained from the MySQL Cluster sources when
816
was compiled\&. For this reason, no connection to a running MySQL Cluster or access to a
820
file is required for these two options\&.
831
is not supported\&. If you attempt to do so, the usual (current) result is that all other options besides
835
are simply ignored\&. However, this behavior is not guaranteed and is subject to change at any time\&. In addition, since
839
option does not access the MySQL Cluster or read any files, trying to specify additional options such as
840
\fB\-\-ndb\-connectstring\fR
842
\fB\-\-config\-file\fR
858
To obtain the node ID and type of each node in the cluster:
864
shell> \fB\&./ndb_config \-\-query=id,type \-\-fields=\':\' \-\-rows=\'\en\'\fR
879
In this example, we used the
881
options to separate the ID and type of each node with a colon character (:), and the
883
options to place the values for each node on a new line in the output\&.
894
To produce a connectstring that can be used by data, SQL, and API nodes to connect to the management server:
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
918
checks only data nodes (using the
920
option), and shows the values for each node\'s ID and host name, and its
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
940
In this example, we used the short options
944
for setting the field delimiter and row separator, respectively\&.
955
To exclude results from any host except one in particular, use the
963
shell> \fB\&./ndb_config \-\-host=192\&.168\&.0\&.176 \-f : \-r \'\en\' \-q id,type\fR
971
In this example, we also used the short form
973
to determine the attributes to be queried\&.
975
Similarly, you can limit results to a node with a specific ID using the
984
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
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.
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.
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/.
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/.
997
Sun Microsystems, Inc. (http://www.mysql.com/).