Cassandra Documentation

Version:

Nodetool

Usage

usage: nodetool [(-pp | --print-port)] [(-pw <password> | --password <password>)] [(-p <port> | --port <port>)] [(-h <host> | --host <host>)] [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)] [(-u <username> | --username <username>)] <command> [<args>]

The most commonly used nodetool commands are:

assassinate - Forcefully remove a dead node without re-replicating any data. Use as a last resort if you cannot removenode

bootstrap - Monitor/manage node’s bootstrap process

checktokenmetadata - compares - the Gossip endpointState and TokenMetadata cache; printing any mismatches found

cleanup - Triggers the immediate cleanup of keys no longer belonging to a node. By default, clean all keyspaces

clearsnapshot - Remove the snapshot with the given name from the given keyspaces

clientstats - Print information about connected clients

compact - Force a (major) compaction on one or more tables or user-defined compaction on given SSTables

compactionhistory - Print history of compaction

compactionstats - Print statistics on compactions

datapaths - Print all directories where data of tables are stored

decommission - Decommission the node I am connecting to

describecluster - Print the name, snitch, partitioner and schema version of a cluster

describering - Shows the token ranges info of a given keyspace

disableauditlog - Disable the audit log

disableautocompaction - Disable autocompaction for the given keyspace and table

disablebackup - Disable incremental backup

disablebinary - Disable native transport (binary protocol)

disablefullquerylog - Disable the full query log

disablegossip - Disable gossip (effectively marking the node down)

disablehandoff - Disable storing hinted handoffs

disablehintsfordc - Disable hints for a data center

disableoldprotocolversions - Disable old protocol versions

drain - Drain the node (stop accepting writes and flush all tables)

enableauditlog - Enable the audit log

enableautocompaction - Enable autocompaction for the given keyspace and table

enablebackup - Enable incremental backup

enablebinary - Reenable native transport (binary protocol)

enablefullquerylog - Enable full query logging, defaults for the options are configured in cassandra.yaml

enablegossip - Reenable gossip

enablehandoff - Reenable future hints storing on the current node

enablehintsfordc - Enable hints for a data center that was previsouly disabled

enableoldprotocolversions - Enable old protocol versions

failuredetector - Shows the failure detector information for the cluster

flush - Flush one or more tables

garbagecollect - Remove deleted data from one or more tables

gcstats - Print GC Statistics

getauditlog - Print configuration of audit log if enabled, otherwise the configuration reflected in cassandra.yaml

getauthcacheconfig - Get configuration of Auth cache

getbatchlogreplaythrottle - Print batchlog replay throttle in KB/s. This is reduced proportionally to the number of nodes in the cluster.

getcolumnindexsize - Print the granularity of the collation index of rows within a partition in KiB

getcompactionthreshold - Print min and max compaction thresholds for a given table

getcompactionthroughput - Print the MiB/s throughput cap for compaction in the system as a rounded number

getconcurrency - Get maximum concurrency for processing stages

getconcurrentcompactors - Get the number of concurrent compactors in the system.

getconcurrentviewbuilders - Get the number of concurrent view builders in the system

getdefaultrf - Gets default keyspace replication factor.

getendpoints - Print the end points that owns the key

getfullquerylog - Print configuration of fql if enabled, otherwise the configuration reflected in cassandra.yaml

getinterdcstreamthroughput - Print the throughput cap for inter-datacenter streaming and entire SSTable inter-datacenter streaming in the systemin rounded megabits. For precise number, please, use option -d

getlogginglevels - Get the runtime logging levels

getmaxhintwindow - Print the max hint window in ms

getseeds - Get the currently in use seed node IP list excluding the node IP

getsnapshotthrottle - Print the snapshot_links_per_second throttle for snapshot/clearsnapshot

getsstables - Print the sstable filenames that own the key

getstreamthroughput - Print the throughput cap for streaming and entire SSTable streaming in the system in rounded megabits. For precise number, please, use option -d

gettimeout - Print the timeout of the given type in ms

gettraceprobability - Print the current trace probability value

gossipinfo - Shows the gossip information for the cluster

help - Display help information

import - Import new SSTables to the system

info - Print node information (uptime, load, …​)

invalidatecountercache - Invalidate the counter cache

invalidatecredentialscache - Invalidate the credentials cache

invalidatejmxpermissionscache - Invalidate the JMX permissions cache

invalidatekeycache - Invalidate the key cache

invalidatenetworkpermissionscache - Invalidate the network permissions cache

invalidatepermissionscache - Invalidate the permissions cache

invalidaterolescache - Invalidate the roles cache

invalidaterowcache - Invalidate the row cache

join - Join the ring

listpendinghints - Print all pending hints that this node has

listsnapshots - Lists all the snapshots along with the size on disk and true size. True size is the total size of all SSTables which are not backed up to disk. Size on disk is total size of the snapshot on disk. Total TrueDiskSpaceUsed does not make any SSTable deduplication.

move - Move node on the token ring to a new token

netstats - Print network information on provided host (connecting node by default)

pausehandoff - Pause hints delivery process

profileload - Low footprint profiling of activity for a period of time

proxyhistograms - Print statistic histograms for network operations

rangekeysample - Shows the sampled keys held across all keyspaces

rebuild - Rebuild data by streaming from other nodes (similarly to bootstrap)

rebuild_index - A full rebuild of native secondary indexes for a given table

recompress_sstables - Rewrite sstables (for the requested tables) that have compression configuration different from the current

refresh - Load newly placed SSTables to the system without restart

refreshsizeestimates - Refresh system.size_estimates

reloadlocalschema - Reload local node schema from system tables

reloadseeds - Reload the seed node list from the seed node provider

reloadssl - Signals Cassandra to reload SSL certificates

reloadtriggers - Reload trigger classes

relocatesstables - Relocates sstables to the correct disk

removenode - Show status of current node removal, force completion of pending removal or remove provided ID

repair - Repair one or more tables

repair_admin - list - and fail incremental repair sessions

replaybatchlog - Kick off batchlog replay and wait for finish

resetfullquerylog - Stop the full query log and clean files in the configured full query log directory from cassandra.yaml as well as JMX

resetlocalschema - Reset node’s local schema and resync

resumehandoff - Resume hints delivery process

ring - Print information about the token ring

scrub - Scrub (rebuild sstables for) one or more tables

setauthcacheconfig - Set configuration for Auth cache

setbatchlogreplaythrottle - Set batchlog replay throttle in KB per second, or 0 to disable throttling. This will be reduced proportionally to the number of nodes in the cluster.

setcachecapacity - Set global key, row, and counter cache capacities (in MB units)

setcachekeystosave - Set number of keys saved by each cache for faster post-restart warmup. 0 to disable

setcolumnindexsize - Set the granularity of the collation index of rows within a partition in KiB

setcompactionthreshold - Set min and max compaction thresholds for a given table

setcompactionthroughput - Set the MiB/s throughput cap for compaction in the system, or 0 to disable throttling

setconcurrency - Set maximum concurrency for processing stage

setconcurrentcompactors - Set number of concurrent compactors in the system.

setconcurrentviewbuilders - Set the number of concurrent view builders in the system

setdefaultrf - Sets default keyspace replication factor.

sethintedhandoffthrottlekb - Set hinted handoff throttle in KiB per second, per delivery thread.

setinterdcstreamthroughput - Set the throughput cap for inter-datacenter streaming and entire SSTable inter-datacenter streaming in the system, or 0 to disable throttling

setlogginglevel - Set the log level threshold for a given component or class. Will reset to the initial configuration if called with no parameters.

setmaxhintwindow - Set the specified max hint window in ms

setsnapshotthrottle - Set the snapshot_links_per_second cap for snapshot and clearsnapshot throttling

setstreamthroughput - Set throughput cap for streaming and entire SSTable streaming in the system, or 0 to disable throttling

settimeout - Set the specified timeout in ms, or 0 to disable timeout

settraceprobability - Sets the probability for tracing any given request to value. 0 disables, 1 enables for all requests, 0 is the default

sjk - Run commands of 'Swiss Java Knife'. Run 'nodetool sjk --help' for more information.

snapshot - Take a snapshot of specified keyspaces or a snapshot of the specified table

status - Print cluster information (state, load, IDs, …​)

statusautocompaction - status - of autocompaction of the given keyspace and table

statusbackup - Status of incremental backup

statusbinary - Status of native transport (binary protocol)

statusgossip - Status of gossip

statushandoff - Status of storing future hints on the current node

stop - Stop compaction

stopdaemon - Stop cassandra daemon

tablehistograms - Print statistic histograms for a given table

tablestats - Print statistics on tables

toppartitions - Sample and print the most active partitions

tpstats - Print usage statistics of thread pools

truncatehints - Truncate all hints on the local node, or truncate hints for the endpoint(s) specified.

upgradesstables - Rewrite sstables (for the requested tables) that are not on the current version (thus upgrading them to said current version)

verify - Verify (check data checksum for) one or more tables

version - Print cassandra version

viewbuildstatus - Show progress of a materialized view build

See 'nodetool help <command>' for more information on a specific command.