Differences between revisions 12 and 13
Revision 12 as of 2011-03-07 07:20:48
Size: 3000
Editor: pub
Comment: Added a comment about the deletion of compacted tables requiring the jvm's GC.
Revision 13 as of 2011-03-30 21:33:27
Size: 3036
Editor: 195-239-234-66
Comment: nodeprobe is now nodetool.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from NodeProbe

More and more instrumentation is being added to Cassandra via standard JMX apis.

The nodetool utility (nodeprobe in versions prior to 0.6) provides a simple command line interface to these exposed operations and attributes.

See Operations for a more high-level view of when you would want to use the actions described here.

Note: This utility currently requires the same environment as cassandra itself, namely the same classpath (including log4j.properties), and a valid storage-conf property.

Running bin/nodetool with no arguments produces some simple usage output.

usage: java org.apache.cassandra.tools.NodeCmd -host <arg> <command>

 -h, -host <arg>   node hostname or ip address
 -p, -port <arg>   remote jmx agent port number

Available commands: ring, info, version, cleanup, compact, cfstats,
snapshot [snapshotname], clearsnapshot, tpstats, flush, drain, repair,
decommission, move, loadbalance, removetoken, setcachecapacity <keyspace>
<cfname> <keycachecapacity> <rowcachecapacity>, getcompactionthreshold,
setcompactionthreshold [minthreshold] ([maxthreshold]), streams [host]

The -host argument is required, the -port argument is optional and will default to 8080 if not supplied.

* In 0.7, streams is replaced by netstats.


The ring command will present node status and an ascii art rendition of the ring, as determined by the node being queried.

bin/nodetool -host ring
Address       Status     Load          Range                                      Ring  Up         459.27 MB     75603446264197340449435394672681112420     |<--|  Up         382.53 MB     137462771597874153173150284137310597304    |   |  Up         511.34 MB     63538518574533451921556363897953848387     |-->|


Outputs node information including the token, load info (on disk storage), generation number (times started), uptime in seconds, and heap memory usage.

bin/nodetool -host info
Load Info        : 0 bytes.
Generation No    : 1
Uptime (seconds) : 697595
Heap Memory (MB) : 28.18 / 759.81


Triggers the immediate cleanup of keys no longer belonging to this node.

bin/nodetool -host cleanup


Initiates an immediate table compaction.

Note: the compacted tables will not immediately be cleared from the hard disk and will remain on the system until the JVM performs a GC. For more information, read about MemtableSSTables.

bin/nodetool -host compact


Tells the node to move its data elsewhere; opposite of bootstrap. Since 0.5. See https://issues.apache.org/jira/browse/CASSANDRA-435


Flushes memtables on the node and stop accepting writes. Reads will still be processed. Useful for rolling upgrades.

NodeTool (last edited 2014-10-31 23:41:27 by 162)