The options 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.
Causes ndb_config to print a list of available options, and then exit.
Causes ndb_config to print a version information string, and then exit.
Specifies the connectstring to use in connecting to the management server. The format for the connectstring is the same as described in Section 3.4.2, "The Cluster Connectstring", and defaults to localhost:1186.
Note The use of -c as a short version for this option is supported for ndb_config beginning with MySQL 5.0.29.
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 ndb_config is invoked, then an absolute path must be used.
This is a comma-delimited list of query options --- that is, a list of one or more node attributes to be returned. These include id (node ID), type (node type --- that is, ndbd, mysqld, or ndb_mgmd), and any configuration parameters whose values are to be obtained.
For example, --query=id,type,indexmemory,datamemory would return the node ID, node type, DataMemory, and IndexMemory for each node.
Note 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.
Specifies the hostname of the node for which configuration information is to be obtained.
Used to specify the node ID of the node for which configuration information is to be obtained.
(Tells ndb_config to print information from parameters defined in [ndbd] 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 [tcp] and other sections of cluster configuration files.)
Filters results so that only configuration values applying to nodes of the specified node_type (ndbd, mysqld, or ndb_mgmd) are returned.
Specifies a delimiter string used to separate the fields in the result. The default is "," (the comma character).
Note If the delimiter contains spaces or escapes (such as \n for the linefeed character), then it must be quoted.
Specifies a separator string used to separate the rows in the result. The default is a space character.
Note If the separator contains spaces or escapes (such as \n for the linefeed character), then it must be quoted.
shell> ./ndb_config --query=id,type --fields=':' --rows='\n' 1:ndbd 2:ndbd 3:ndbd 4:ndbd 5:ndb_mgmd 6:mysqld 7:mysqld 8:mysqld 9:mysqld
shell> ./ndb_config --config-file=usr/local/mysql/cluster-data/config.ini --query=hostname,portnumber --fields=: --rows=, --type=ndb_mgmd 192.168.0.179:1186
shell> ./ndb_config --type=ndbd --query=id,host,datamemory,indexmemory,datadir -f ' : ' -r '\n' 1 : 192.168.0.193 : 83886080 : 18874368 : /usr/local/mysql/cluster-data 2 : 192.168.0.112 : 83886080 : 18874368 : /usr/local/mysql/cluster-data 3 : 192.168.0.176 : 83886080 : 18874368 : /usr/local/mysql/cluster-data 4 : 192.168.0.119 : 83886080 : 18874368 : /usr/local/mysql/cluster-data
shell> ./ndb_config --host=192.168.0.176 -f : -r '\n' -q id,type 3:ndbd 5:ndb_mgmd
Similarly, you can limit results to a node with a specific ID using the --id or --nodeid option.
Copyright 2007-2008 MySQL AB
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.
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.
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/.