NDB_TOP(1)

NAME
ndb_top - View CPU usage information for NDB threads

SYNOPSIS

ndb_top options

DESCRIPTION

ndb_top displays running information in the terminal about CPU usage by NDB threads on an NDB Cluster data node. Each thread is represented by two rows in the output, the first showing system statistics, the second showing the measured statistics for the thread.

ndb_top is available beginning with MySQL NDB Cluster 7.6.3. Usage

    ndb_top [-h hostname] [-t port] [-u user] [-p pass] [-n node_id]

ndb_top connects to a MySQL Server running as an SQL node of the cluster. By default, it attempts to connect to a mysqld running on localhost and port 3360, as the MySQL root user with no password specified. You can override the default host and port using, respectively, --host (-h) and --port (-t). To specify a MySQL user and password, use the --user (-u) and --passwd (-p) options. This user must be able to read tables in the ndbinfo database (ndb_top uses information from ndbinfo.cpustat and related tables).

For more information about MySQL user accounts and passwords, see Section 6.3, “MySQL User Account Management”, as well as Section 6.2, “The MySQL Access Privilege System”.

Output is available as plain text or an ASCII graph; you can specify this using the --text (-x) and --graph (-g) options, respectively. These two display modes provide the same information; they can be used concurrently. At least one display mode must be in use.

Color display of the graph is supported and enabled by default (--color or -c option). With color support enabled, the graph display shows OS user time in blue, OS system time in green, and idle time as blank. For measured load, blue is used for execution time, yellow for send time, red for time spent in send buffer full waits, and blank spaces for idle time. The percentage shown in the graph display is the sum of percentages for all threads which are not idle. Colors are not currently configurable; you can use grayscale instead by using --skip-color.

The sorted view (--sort, -r) is based on the maximum of the measured load and the load reported by the OS. Display of these can be enabled and disabled using the --measured-load (-m) and --os-load (-o) options. Display of at least one of these loads must be enabled.

The program tries to obtain statistics from a data node having the node ID given by the --node-id (-n) option; if unspecified, this is 1. ndb_top cannot provide information about other types of nodes.

The view adjusts itself to the height and width of the terminal window; the minimum supported width is 76 characters.

Once started, ndb_top runs continuously until forced to exit; you can quit the program using Ctrl-C. The display updates once per second; to set a different delay interval, use --sleep-time (-s).

    Note

    ndb_top is available on Mac OS X, Linux, and Solaris. It is not currently supported on Windows platforms.

The following table includes all options that are specific to the NDB Cluster program ndb_top. Additional descriptions follow the table.

Table 21.108. This table describes command-line options for the ndb_top program

Additional Options

    • --color, -c
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --color
    Permitted Values | Type | boolean
     | Default | TRUE

    Show ASCII graphs in color; use --skip-colors to disable.

    • --graph, -g
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --graph
    Permitted Values | Type | boolean
     | Default | TRUE

    Display data using graphs; use --skip-graphs to disable. This option or --text must be true; both options may be true.

    • --help, -?
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --help
    Permitted Values | Type | boolean
     | Default | TRUE

    Show program usage information.

    • --host[=name], -h
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --host[=name]
    Permitted Values | Type | string
     | Default | localhost

    Host name or IP address of MySQL Server to connect to.

    • --measured-load, -m
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --measured-load
    Permitted Values | Type | boolean
     | Default | FALSE

    Show measured load by thread. This option or --os-load must be true; both options may be true.

    • --node-id[=#], -n
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --node-id[=#]
    Permitted Values | Type | integer
     | Default | 1

    Watch the data node having this node ID.

    • --os-load, -o
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --os-load
    Permitted Values | Type | boolean
     | Default | TRUE

    Show load measured by operating system. This option or --measured-load must be true; both options may be true.

    • --passwd[=password], -p
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --passwd[=password]
    Permitted Values | Type | boolean
     | Default | NULL

    Connect using this password.

    • --port[=#], -t
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --port[=#]
    Permitted Values | Type | integer
     | Default | 3306

    Port number to use when connecting to MySQL Server.

    • --sleep-time[=seconds], -s
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --sleep-time[=seconds]
    Permitted Values | Type | integer
     | Default | 1

    Time to wait between display refreshes, in seconds.

    • --sort, -r
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --sort
    Permitted Values | Type | boolean
     | Default | TRUE

    Sort threads by usage; use --skip-sort to disable.

    • --text, -x
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --text
    Permitted Values | Type | boolean
     | Default | FALSE

    Display data using text. This option or --graph must be true; both options may be true.

    • --user[=name], -u
    Introduced | 5.7.19-ndb-7.6.3
    Command-Line Format | --user[=name]
    Permitted Values | Type | string
     | Default | root

    Connect as this MySQL user.

Sample Output. The next figure shows ndb_top running in a terminal window on a Linux system with an ndbmtd data node under a moderate load. Here, the program has been invoked using ndb_top -n8 -x to provide both text and graph output:

    [IMAGE][1] [IMAGE][1] Display from ndb_top, running in a terminal
              window.

COPYRIGHT

Copyright © 1997, 2017, Oracle and/or its affiliates. All rights reserved.

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.

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/.

NOTES

1.  [set $man.base.url.for.relative.links]/../refman-common/images/published/ndb-top-1.png

SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/.

AUTHOR
Oracle Corporation (http://dev.mysql.com/).