Rechercher dans le manuel MySQL

22.5.10.9 The ndbinfo config_values Table

The config_values table provides information about the current state of node configuration parameter values. Each row in the table corresponds to the current value of a parameter on a given node.

Table 22.383 Columns of the config_params table

Column Name Type Description
node_id integer ID of the node in the cluster
config_param integer The parameter's internal ID number
config_value string Current value of the parameter

This table's config_param column and the config_params table's param_number column use the same parameter identifiers. By joining the two tables on these columns, you can obtain detailed information about desired node configuration parameters. The query shown here provides the current values for all parameters on each data node in the cluster, ordered by node ID and parameter name:

  1. SELECT    v.node_id AS 'Node Id',
  2.           p.param_name AS 'Parameter',
  3.           v.config_value AS 'Value'
  4. FROM      config_values v
  5. JOIN      config_params p
  6. ON        v.config_param=p.param_number
  7. WHERE     p.param_name NOT LIKE '\_\_%'
  8. ORDER BY  v.node_id, p.param_name;

Partial output from the previous query when run on a small example cluster used for simple testing:

  1. +---------+------------------------------------------+----------------+
  2. | Node Id | Parameter                                | Value          |
  3. +---------+------------------------------------------+----------------+
  4. |       2 | Arbitration                              | 1              |
  5. |       2 | ArbitrationTimeout                       | 7500           |
  6. |       2 | BackupDataBufferSize                     | 16777216       |
  7. |       2 | BackupDataDir                            | /home/jon/data |
  8. |       2 | BackupDiskWriteSpeedPct                  | 50             |
  9. |       2 | BackupLogBufferSize                      | 16777216       |
  10.  
  11. ...
  12.  
  13. |       3 | TotalSendBufferMemory                    | 0              |
  14. |       3 | TransactionBufferMemory                  | 1048576        |
  15. |       3 | TransactionDeadlockDetectionTimeout      | 1200           |
  16. |       3 | TransactionInactiveTimeout               | 4294967039     |
  17. |       3 | TwoPassInitialNodeRestartCopy            | 0              |
  18. |       3 | UndoDataBuffer                           | 16777216       |
  19. |       3 | UndoIndexBuffer                          | 2097152        |
  20. +---------+------------------------------------------+----------------+
  21. 248 rows in set (0.02 sec)

The WHERE clause filters out parameters whose names begin with a double underscore (__); these parameters are reserved for testing and other internal uses by the NDB developers, and are not intended for use in a production NDB Cluster.

You can obtain output that is more specific, more detailed, or both by issuing the proper queries. This example provides all types of available information about the NodeId, NoOfReplicas, HostName, DataMemory, IndexMemory, and TotalSendBufferMemory parameters as currently set for all data nodes in the cluster:

  1. SELECT  p.param_name AS Name,
  2.         v.node_id AS Node,
  3.         p.param_type AS Type,
  4.         p.param_default AS 'Default',
  5.         p.param_min AS Minimum,
  6.         p.param_max AS Maximum,
  7.         CASE p.param_mandatory WHEN 1 THEN 'Y' ELSE 'N' END AS 'Required',
  8.         v.config_value AS Current
  9. FROM    config_params p
  10. JOIN    config_values v
  11. ON      p.param_number = v.config_param
  12. WHERE   p. param_name
  13.   IN ('NodeId', 'NoOfReplicas', 'HostName',
  14.       'DataMemory', 'IndexMemory', 'TotalSendBufferMemory')\G

The output from this query when run on a small NDB Cluster with 2 data nodes used for simple testing is shown here:

  1. *************************** 1. row ***************************
  2.     Name: NodeId
  3.     Node: 2
  4.     Type: unsigned
  5.  Minimum: 1
  6.  Maximum: 48
  7. Required: Y
  8.  Current: 2
  9. *************************** 2. row ***************************
  10.     Name: HostName
  11.     Node: 2
  12.     Type: string
  13.  Default: localhost
  14.  Minimum:
  15.  Maximum:
  16. Required: N
  17.  Current: 127.0.0.1
  18. *************************** 3. row ***************************
  19.     Name: TotalSendBufferMemory
  20.     Node: 2
  21.     Type: unsigned
  22.  Default: 0
  23.  Minimum: 262144
  24.  Maximum: 4294967039
  25. Required: N
  26.  Current: 0
  27. *************************** 4. row ***************************
  28.     Name: NoOfReplicas
  29.     Node: 2
  30.     Type: unsigned
  31.  Default: 2
  32.  Minimum: 1
  33.  Maximum: 4
  34. Required: N
  35.  Current: 2
  36. *************************** 5. row ***************************
  37.     Name: DataMemory
  38.     Node: 2
  39.     Type: unsigned
  40.  Default: 102760448
  41.  Minimum: 1048576
  42.  Maximum: 1099511627776
  43. Required: N
  44.  Current: 524288000
  45. *************************** 6. row ***************************
  46.     Name: NodeId
  47.     Node: 3
  48.     Type: unsigned
  49.  Minimum: 1
  50.  Maximum: 48
  51. Required: Y
  52.  Current: 3
  53. *************************** 7. row ***************************
  54.     Name: HostName
  55.     Node: 3
  56.     Type: string
  57.  Default: localhost
  58.  Minimum:
  59.  Maximum:
  60. Required: N
  61.  Current: 127.0.0.1
  62. *************************** 8. row ***************************
  63.     Name: TotalSendBufferMemory
  64.     Node: 3
  65.     Type: unsigned
  66.  Default: 0
  67.  Minimum: 262144
  68.  Maximum: 4294967039
  69. Required: N
  70.  Current: 0
  71. *************************** 9. row ***************************
  72.     Name: NoOfReplicas
  73.     Node: 3
  74.     Type: unsigned
  75.  Default: 2
  76.  Minimum: 1
  77.  Maximum: 4
  78. Required: N
  79.  Current: 2
  80. *************************** 10. row ***************************
  81.     Name: DataMemory
  82.     Node: 3
  83.     Type: unsigned
  84.  Default: 102760448
  85.  Minimum: 1048576
  86.  Maximum: 1099511627776
  87. Required: N
  88.  Current: 524288000
  89. 10 rows in set (0.01 sec)

Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-mysql-cluster-ndbinfo-config-values.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut