1
by Chuck Short
Import upstream version 5.1.30 |
1 |
.\" Title: \fBndb_config\fR |
2 |
.\" Author: |
|
3 |
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/> |
|
1.1.1
by Mathias Gug
Import upstream version 5.1.31 |
4 |
.\" Date: 01/19/2009 |
1
by Chuck Short
Import upstream version 5.1.30 |
5 |
.\" Manual: MySQL Database System |
6 |
.\" Source: MySQL 5.1 |
|
7 |
.\" |
|
1.1.1
by Mathias Gug
Import upstream version 5.1.31 |
8 |
.TH "\fBNDB_CONFIG\fR" "1" "01/19/2009" "MySQL 5.1" "MySQL Database System" |
1
by Chuck Short
Import upstream version 5.1.30 |
9 |
.\" disable hyphenation |
10 |
.nh
|
|
11 |
.\" disable justification (adjust text to left margin only) |
|
12 |
.ad l |
|
13 |
.SH "NAME" |
|
1.1.1
by Mathias Gug
Import upstream version 5.1.31 |
14 |
ndb_config \- extract MySQL Cluster configuration information
|
1
by Chuck Short
Import upstream version 5.1.30 |
15 |
.SH "SYNOPSIS" |
16 |
.HP 19 |
|
17 |
\fBndb_config \fR\fB\fIoptions\fR\fR |
|
18 |
.SH "DESCRIPTION" |
|
19 |
.PP
|
|
20 |
This tool extracts configuration information for data nodes, SQL nodes, and API nodes from a cluster management node (and possibly its |
|
21 |
\fIconfig.ini\fR |
|
22 |
file). |
|
23 |
.PP
|
|
24 |
\fBUsage\fR: |
|
25 |
.sp
|
|
26 |
.RS 3n |
|
27 |
.nf
|
|
28 |
ndb_config \fIoptions\fR |
|
29 |
.fi
|
|
30 |
.RE
|
|
31 |
.PP
|
|
32 |
The |
|
33 |
\fIoptions\fR |
|
34 |
available for this utility differ somewhat from those used with the other utilities, and so are listed in their entirety in the next section, followed by some examples. |
|
35 |
.PP
|
|
36 |
\fBOptions\fR: |
|
37 |
.TP 3n |
|
38 |
\(bu
|
|
39 |
\fB\-\-usage\fR, |
|
40 |
\fB\-\-help\fR, or |
|
41 |
\fB\-?\fR |
|
42 |
.sp
|
|
43 |
Causes |
|
44 |
\fBndb_config\fR |
|
45 |
to print a list of available options, and then exit. |
|
46 |
.TP 3n |
|
47 |
\(bu
|
|
48 |
\fB\-\-version\fR, |
|
49 |
\fB\-V\fR |
|
50 |
.sp
|
|
51 |
Causes |
|
52 |
\fBndb_config\fR |
|
53 |
to print a version information string, and then exit. |
|
54 |
.TP 3n |
|
55 |
\(bu
|
|
56 |
\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR |
|
57 |
.sp
|
|
58 |
Specifies the connectstring to use in connecting to the management server. The format for the connectstring is the same as described in |
|
1.1.1
by Mathias Gug
Import upstream version 5.1.31 |
59 |
Section\ 3.4.3, \(lqThe MySQL Cluster Connectstring\(rq, and defaults to |
1
by Chuck Short
Import upstream version 5.1.30 |
60 |
localhost:1186. |
61 |
.sp
|
|
62 |
The use of |
|
63 |
\fB\-c\fR |
|
64 |
as a short version for this option is supported for |
|
65 |
\fBndb_config\fR |
|
66 |
beginning with MySQL 5.1.12. |
|
67 |
.TP 3n |
|
68 |
\(bu
|
|
69 |
\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR |
|
70 |
.sp
|
|
71 |
Gives the path to the management server's configuration file (\fIconfig.ini\fR). This may be a relative or absolute path. If the management node resides on a different host from the one on which |
|
72 |
\fBndb_config\fR |
|
73 |
is invoked, then an absolute path must be used. |
|
74 |
.TP 3n |
|
75 |
\(bu
|
|
76 |
\fB\-\-query=\fR\fB\fIquery\-options\fR\fR, |
|
77 |
\fB\-q\fR |
|
78 |
\fIquery\-options\fR |
|
79 |
.sp
|
|
80 |
This is a comma\-delimited list of
|
|
81 |
query options |
|
82 |
\(em that is, a list of one or more node attributes to be returned. These include
|
|
83 |
id |
|
84 |
(node ID), type (node type \(em that is,
|
|
85 |
ndbd, |
|
86 |
mysqld, or |
|
87 |
ndb_mgmd), and any configuration parameters whose values are to be obtained. |
|
88 |
.sp
|
|
89 |
For example, |
|
90 |
\fB\-\-query=id,type,indexmemory,datamemory\fR |
|
91 |
would return the node ID, node type, |
|
92 |
DataMemory, and |
|
93 |
IndexMemory |
|
94 |
for each node. |
|
95 |
.sp
|
|
96 |
.it 1 an-trap |
|
97 |
.nr an-no-space-flag 1 |
|
98 |
.nr an-break-flag 1 |
|
99 |
.br
|
|
100 |
\fBNote\fR |
|
101 |
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. |
|
102 |
.TP 3n |
|
103 |
\(bu
|
|
104 |
\fB\-\-host=\fR\fB\fIhostname\fR\fR |
|
105 |
.sp
|
|
106 |
Specifies the hostname of the node for which configuration information is to be obtained. |
|
107 |
.TP 3n |
|
108 |
\(bu
|
|
109 |
\fB\-\-id=\fR\fB\fInode_id\fR\fR, |
|
110 |
\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR |
|
111 |
.sp
|
|
112 |
Used to specify the node ID of the node for which configuration information is to be obtained. |
|
113 |
.TP 3n |
|
114 |
\(bu
|
|
115 |
\fB\-\-nodes\fR |
|
116 |
.sp
|
|
117 |
(Tells |
|
118 |
\fBndb_config\fR |
|
119 |
to print information from parameters defined in |
|
120 |
[ndbd] |
|
121 |
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 |
|
122 |
[tcp] |
|
123 |
and other sections of cluster configuration files.) |
|
124 |
.TP 3n |
|
125 |
\(bu
|
|
126 |
\fB\-\-type=\fR\fB\fInode_type\fR\fR |
|
127 |
.sp
|
|
128 |
Filters results so that only configuration values applying to nodes of the specified |
|
129 |
\fInode_type\fR |
|
130 |
(ndbd, |
|
131 |
mysqld, or |
|
132 |
ndb_mgmd) are returned. |
|
133 |
.TP 3n |
|
134 |
\(bu
|
|
135 |
\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, |
|
136 |
\fB\-f\fR |
|
137 |
\fIdelimiter\fR |
|
138 |
.sp
|
|
139 |
Specifies a |
|
140 |
\fIdelimiter\fR |
|
141 |
string used to separate the fields in the result. The default is |
|
142 |
\(lq,\(rq |
|
143 |
(the comma character). |
|
144 |
.sp
|
|
145 |
.it 1 an-trap |
|
146 |
.nr an-no-space-flag 1 |
|
147 |
.nr an-break-flag 1 |
|
148 |
.br
|
|
149 |
\fBNote\fR |
|
150 |
If the |
|
151 |
\fIdelimiter\fR |
|
152 |
contains spaces or escapes (such as |
|
153 |
\\n
|
|
154 |
for the linefeed character), then it must be quoted. |
|
155 |
.TP 3n |
|
156 |
\(bu
|
|
157 |
\fB\-\-rows=\fR\fB\fIseparator\fR\fR, |
|
158 |
\fB\-r\fR |
|
159 |
\fIseparator\fR |
|
160 |
.sp
|
|
161 |
Specifies a |
|
162 |
\fIseparator\fR |
|
163 |
string used to separate the rows in the result. The default is a space character. |
|
164 |
.sp
|
|
165 |
.it 1 an-trap |
|
166 |
.nr an-no-space-flag 1 |
|
167 |
.nr an-break-flag 1 |
|
168 |
.br
|
|
169 |
\fBNote\fR |
|
170 |
If the |
|
171 |
\fIseparator\fR |
|
172 |
contains spaces or escapes (such as |
|
173 |
\\n
|
|
174 |
for the linefeed character), then it must be quoted. |
|
175 |
.sp
|
|
176 |
.RE
|
|
177 |
.PP
|
|
178 |
\fBExamples\fR: |
|
179 |
.TP 3n |
|
180 |
1. |
|
181 |
To obtain the node ID and type of each node in the cluster: |
|
182 |
.sp
|
|
183 |
.RS 3n |
|
184 |
.nf
|
|
185 |
shell> \fB./ndb_config \-\-query=id,type \-\-fields=':' \-\-rows='\\n'\fR |
|
186 |
1:ndbd |
|
187 |
2:ndbd |
|
188 |
3:ndbd |
|
189 |
4:ndbd |
|
190 |
5:ndb_mgmd |
|
191 |
6:mysqld |
|
192 |
7:mysqld |
|
193 |
8:mysqld |
|
194 |
9:mysqld |
|
195 |
.fi
|
|
196 |
.RE
|
|
197 |
In this example, we used the |
|
198 |
\fB\-\-fields\fR |
|
199 |
options to separate the ID and type of each node with a colon character (:), and the |
|
200 |
\fB\-\-rows\fR |
|
201 |
options to place the values for each node on a new line in the output. |
|
202 |
.TP 3n |
|
203 |
2. |
|
204 |
To produce a connectstring that can be used by data, SQL, and API nodes to connect to the management server: |
|
205 |
.sp
|
|
206 |
.RS 3n |
|
207 |
.nf
|
|
208 |
shell> \fB./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config.ini \-\-query=hostname,portnumber \-\-fields=: \-\-rows=, \-\-type=ndb_mgmd\fR |
|
209 |
192.168.0.179:1186 |
|
210 |
.fi
|
|
211 |
.RE
|
|
212 |
.TP 3n |
|
213 |
3. |
|
214 |
This invocation of |
|
215 |
\fBndb_config\fR |
|
216 |
checks only data nodes (using the |
|
217 |
\fB\-\-type\fR |
|
218 |
option), and shows the values for each node's ID and hostname, and its |
|
219 |
DataMemory, |
|
220 |
IndexMemory, and |
|
221 |
DataDir |
|
222 |
parameters: |
|
223 |
.sp
|
|
224 |
.RS 3n |
|
225 |
.nf
|
|
226 |
shell> \fB./ndb_config \-\-type=ndbd \-\-query=id,host,datamemory,indexmemory,datadir \-f ' : ' \-r '\\n'\fR |
|
227 |
1 : 192.168.0.193 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
|
|
228 |
2 : 192.168.0.112 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
|
|
229 |
3 : 192.168.0.176 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
|
|
230 |
4 : 192.168.0.119 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data
|
|
231 |
.fi
|
|
232 |
.RE
|
|
233 |
In this example, we used the short options |
|
234 |
\fB\-f\fR |
|
235 |
and |
|
236 |
\fB\-r\fR |
|
237 |
for setting the field delimiter and row separator, respectively. |
|
238 |
.TP 3n |
|
239 |
4. |
|
240 |
To exclude results from any host except one in particular, use the |
|
241 |
\fB\-\-host\fR |
|
242 |
option: |
|
243 |
.sp
|
|
244 |
.RS 3n |
|
245 |
.nf
|
|
246 |
shell> \fB./ndb_config \-\-host=192.168.0.176 \-f : \-r '\\n' \-q id,type\fR |
|
247 |
3:ndbd |
|
248 |
5:ndb_mgmd |
|
249 |
.fi
|
|
250 |
.RE
|
|
251 |
In this example, we also used the short form |
|
252 |
\fB\-q\fR |
|
253 |
to determine the attributes to be queried. |
|
254 |
.sp
|
|
255 |
Similarly, you can limit results to a node with a specific ID using the |
|
256 |
\fB\-\-id\fR |
|
257 |
or |
|
258 |
\fB\-\-nodeid\fR |
|
259 |
option. |
|
260 |
.SH "COPYRIGHT" |
|
261 |
.PP
|
|
262 |
Copyright 2007\-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
|
263 |
.PP
|
|
264 |
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. |
|
265 |
.PP
|
|
266 |
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. |
|
267 |
.PP
|
|
268 |
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/.
|
|
269 |
.SH "SEE ALSO" |
|
270 |
For more information, please refer to the MySQL Reference Manual, |
|
271 |
which may already be installed locally and which is also available |
|
272 |
online at http://dev.mysql.com/doc/. |
|
273 |
.SH AUTHOR |
|
274 |
MySQL AB (http://www.mysql.com/). |