About the nodetool utility

A command line interface for managing a cluster.

The nodetool utility is a command line interface for managing a cluster.

Command formats

nodetool [options] command [args]
installation_location/cassandra/bin
  • Cassandra package installations: /etc/cassandra
  • Cassandra tarball installations: install_location/conf

Main options

The following options apply to all nodetool commands:
Table 1. Main options
Short Long Description
-h --host Hostname or IP address.
-p --port Port number.
-pwf --password-file Password file path.
-pw --password Password.
-u --username Username.
-- Separates command parameters from a list of options.
Note:
  • If a username and password for RMI authentication are set explicitly in the cassandra-env.sh file for the host, then you must specify credentials.
    The location of the cassandra-env.sh file depends on the type of installation:
    Cassandra package installations /etc/cassandra/cassandra-env.sh
    Cassandra tarball installations install_location/conf/cassandra-env.sh
  • The repair and rebuild commands can affect multiple nodes in the cluster.
  • Most nodetool commands operate on a single node in the cluster if -h is not used to identify one or more other nodes. If the node from which you issue the command is the intended target, you do not need the -h option to identify the target; otherwise, for remote invocation, identify the target node, or nodes, using -h.
Example:
nodetool -u username -pw password command command_options

Using nodetool command help

nodetool help
Provides a listing of nodetool commands.
nodetool help command
Provides help on a specific command. For example:
nodetool help upgradesstables
For more information, see nodetool help