The nodetool utility

The nodetool utility is a command-line interface for monitoring a cluster and performing routine database operations. It is typically run from an operational node.

The nodetool utility supports the most important JMX metrics and operations, and includes other useful commands for cluster administration.

  • [x] About the nodetool utility: A command line interface for monitoring a cluster and performing routine database operations.
  • [-] nodetool abortrebuild: Abort a currently running rebuild operation. Completes processing of active streams, but no new streams are started.
  • [x] nodetool assassinate: Forcefully removes a dead node without re-replicating any data. It is a last resort tool if you cannot successfully use nodetool removenode.
  • [ ] nodetool bootstrap: Monitor and manage a node's bootstrap process.
  • [ ] nodetool cfhistograms: This tool has been renamed to tablehistograms.
  • [ ] nodetool cfstats: This tool has been renamed nodetool tablestats.
  • [ ] nodetool cleanup: Cleans up keyspaces and partition keys no longer belonging to a node.
  • [ ] nodetool clearsnapshot: Removes one or more snapshots.
  • [ ] nodetool compact: Forces a major compaction on one or more tables.
  • [ ] nodetool compactionhistory: Provides the history of compaction operations.
  • [ ] nodetool compactionstats: Provide statistics about a compaction.
  • [-] nodetool decommission: Deactivates a node by streaming its data to another node.
  • [ ] nodetool describecluster: Provide the name, snitch, partitioner and schema version of a cluster
  • [ ] nodetool describering: Provides the partition ranges of a keyspace.
  • [ ] nodetool disableautocompaction: Disables autocompaction for a keyspace and one or more tables on the current node only.
  • [ ] nodetool disablebackup: Disables incremental backup.
  • [ ] nodetool disablebinary: Disables the native transport.
  • [ ] nodetool disablegossip: Disables the gossip protocol.
  • [ ] nodetool disablehandoff: Disables storing of future hints on the current node.
  • [ ] nodetool disablehintsfordc: Disable hints for a datacenter.
  • [ ] nodetool disablethrift: Disables the Thrift server.
  • [-] nodetool drain: Drains the node.
  • [ ] nodetool enableautocompaction: Enables autocompaction for a keyspace and one or more tables.
  • [ ] nodetool enablebackup: Enables incremental backup.
  • [ ] nodetool enablebinary: Re-enables native transport.
  • [ ] nodetool enablegossip: Re-enables gossip.
  • [ ] nodetool enablehandoff: Re-enables the storing of future hints on the current node.
  • [ ] nodetool enablehintsfordc: Enable hints for a datacenter.
  • [ ] nodetool enablethrift: Re-enables the Thrift server.
  • [ ] nodetool failuredetector: Shows the failure detector information for the cluster.
  • [ ] nodetool flush: Flushes one or more tables from the memtable.
  • [ ] nodetool garbagecollect: Remove deleted data from one or more tables.
  • [ ] nodetool gcstats: Print garbage collection (GC) statistics.
  • [ ] nodetool getcompactionthreshold: Provides the minimum and maximum compaction thresholds in megabytes for a table.
  • [ ] nodetool getcompactionthroughput: Print the throughput cap in megabytes (MB) per second for compaction in the system.
  • [ ] nodetool getconcurrentcompactors: Get the number of concurrent compactors in the system.
  • [ ] nodetool getendpoints: Provides the IP addresses or names of replicas that own the partition key.
  • [ ] nodetool getinterdcstreamthroughput: Prints the throughput cap in Megabits per second (Mbps) for inter-datacenter streaming.
  • [ ] nodetool getlogginglevels: Get the runtime logging levels.
  • [ ] nodetool getseeds: Refreshes the IP address of the seed node currently in use, as listed by the seed provider.
  • [ ] nodetool getsstables: Provides the SSTables that own the partition key.
  • [ ] nodetool getstreamthroughput: Provides the Mb per second outbound throughput limit for streaming in the system.
  • [ ] nodetool gettimeout: Print the timeout value of the given type in milliseconds.
  • [ ] nodetool gettraceprobability: Get the probability for tracing a request.
  • [ ] nodetool gossipinfo: Provides the gossip information for the cluster.
  • [ ] nodetool help: Provides nodetool command help.
  • [ ] nodetool info: Provides node information, such as load and uptime.
  • [ ] nodetool invalidatecountercache: Resets the global counter cache parameter, counter_cache_keys_to_save, to the default (not set), which saves all keys.
  • [ ] nodetool invalidatekeycache: Resets the global key cache parameter to the default, which saves all keys.
  • [ ] nodetool invalidaterowcache: Resets the global key cache parameter, row_cache_keys_to_save, to the default (not set), which saves all keys.
  • [-] nodetool join: Causes the node to join the ring.
  • [ ] nodetool listsnapshots: Lists snapshot names, size on disk, and true size.
  • [ ] nodetool mark_unrepaired: Mark all target SSTables as unrepaired.
  • [ ] nodetool move: Moves the node on the token ring to a new token.
  • [ ] nodetool netstats: Provides network information about the host.
  • [ ] nodetool nodesyncservice: Manage the NodeSync service on the connected node.
  • [ ] nodetool pausehandoff: Pauses the hints delivery process
  • [ ] nodetool proxyhistograms: Provides a histogram of network statistics.
  • [ ] nodetool rangekeysample: Provides the sampled keys held across all keyspaces.
  • [ ] nodetool rebuild: Rebuilds data by streaming from other nodes.
  • [ ] nodetool rebuild_index: Performs a full rebuild of the index for a table
  • [ ] nodetool refresh: Loads newly placed SSTables onto the system without a restart.
  • [ ] nodetool refreshsizeestimates: Refresh system.size_estimates table.
  • [ ] nodetool reloadseeds: Reloads the seed node list from the seed node provider.
  • [ ] nodetool reloadtriggers: Reloads trigger classes.
  • [ ] nodetool relocatesstables: Rewrites any SSTable that contains tokens that should be in another data directory.
  • [x] nodetool removenode: Provides the status of current node removal, forces completion of pending removal, or removes the identified node.
  • [ ] nodetool repair: Repairs one or more tables.
  • [ ] nodetool replaybatchlog: Replay batchlog and wait for finish.
  • [ ] nodetool resetlocalschema: Reset the node's local schema and resynchronizes.
  • [ ] nodetool resume: Restart a node's bootstrap process.
  • [ ] nodetool resumehandoff: Resume hints delivery process.
  • [ ] nodetool ring: Provides node status and information about the ring.
  • [ ] nodetool scrub: Rebuilds SSTables for one or more tables.
  • [ ] nodetool sequence: Run multiple nodetool commands from a file, resource, or standard input (StdIn) sequentially.
  • [ ] nodetool setcachecapacity: Set global key and row cache capacities in megabytes.
  • [ ] nodetool setcachekeystosave: Sets the number of keys saved by each cache for faster post-restart warmup.
  • [ ] nodetool setcompactionthreshold: Sets minimum and maximum compaction thresholds for a table.
  • [ ] nodetool setcompactionthroughput: Sets the throughput capacity for compaction in the system, or disables throttling.
  • [ ] nodetool setconcurrentcompactors: Set number of concurrent compactors.
  • [ ] nodetool sethintedhandoffthrottlekb: Sets hinted handoff throttle in KB/sec per delivery thread.
  • [ ] nodetool setinterdcstreamthroughput: Sets the inter-datacenter throughput capacity in megabits per second (Mbps) streaming, or 0 to disable throttling.
  • [ ] nodetool setlogginglevel: Set the log level for a service.
  • [ ] nodetool setstreamthroughput: Sets the throughput capacity in megabytes (MB) for outbound streaming in the system, or disables throttling.
  • [ ] nodetool settimeout: Set the specified timeout in milliseconds, or 0 to disable timeout.
  • [ ] nodetool settraceprobability: Sets the probability for tracing a request.
  • [ ] nodetool sjk: Runs Swiss Java Knife (SJK) commands to execute, troubleshoot, and monitor the database.
  • [ ] nodetool snapshot: Backs up data and table schemas.
  • [ ] nodetool status: Provide information about the cluster, such as the state, load, and IDs.
  • [ ] nodetool statusbackup: Provide the status of backup.
  • [ ] nodetool statusbinary: Provide the status of native transport.
  • [ ] nodetool statusgossip: Provide the status of gossip.
  • [ ] nodetool statushandoff: Provides the status of hinted handoff.
  • [ ] nodetool statusthrift: Provide the status of the Thrift server.
  • [ ] nodetool stop: Stops the compaction process.
  • [ ] nodetool stopdaemon: Stops the cassandra daemon.
  • [ ] nodetool tablehistograms: Provides current performance metrics for read and write operations during the past fifteen minutes.
  • [ ] nodetool tablestats: Provides statistics about one or more tables.
  • [ ] nodetool toppartitions: Samples database reads and writes and reports the most active partitions in a specified table.
  • [ ] nodetool tpstats: Provides usage statistics of thread pools.
  • [ ] nodetool truncatehints: Truncates all hints on the local node, or truncates hints for the one or more endpoints.
  • [ ] nodetool upgradesstables: Rewrites SSTables for tables that are not running the current version of DataStax Enterprise.
  • [ ] nodetool verify: Verify (check data checksum for) one or more tables.
  • [ ] nodetool version: Provides the version number of Cassandra running on the specified node.
  • [ ] nodetool viewbuildstatus: ≈Shows the progress of a materialized view build.
nodetool help
usage: nodetool [(-u <username> | --username <username>)]
        [(-p <port> | --port <port>)] [(-h <host> | --host <host>)]
        [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
        [(-pw <password> | --password <password>)] <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
    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. If no snapshotName is specified we will remove all snapshots
    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
    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
    disableautocompaction        Disable autocompaction for the given keyspace and table
    disablebackup                Disable incremental backup
    disablebinary                Disable native transport (binary protocol)
    disablegossip                Disable gossip (effectively marking the node down)
    disablehandoff               Disable storing hinted handoffs
    disablehintsfordc            Disable hints for a data center
    disablethrift                Disable thrift server
    drain                        Drain the node (stop accepting writes and flush all tables)
    enableautocompaction         Enable autocompaction for the given keyspace and table
    enablebackup                 Enable incremental backup
    enablebinary                 Reenable native transport (binary protocol)
    enablegossip                 Reenable gossip
    enablehandoff                Reenable future hints storing on the current node
    enablehintsfordc             Enable hints for a data center that was previsouly disabled
    enablethrift                 Reenable thrift server
    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
    getcompactionthreshold       Print min and max compaction thresholds for a given table
    getcompactionthroughput      Print the MB/s throughput cap for compaction in the system
    getconcurrentcompactors      Get the number of concurrent compactors in the system.
    getendpoints                 Print the end points that owns the key
    getinterdcstreamthroughput   Print the Mb/s throughput cap for inter-datacenter streaming in the system
    getlogginglevels             Get the runtime logging levels
    getsstables                  Print the sstable filenames that own the key
    getstreamthroughput          Print the Mb/s throughput cap for streaming in the system
    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
    info                         Print node information (uptime, load, ...)
    invalidatecountercache       Invalidate the counter cache
    invalidatekeycache           Invalidate the key cache
    invalidaterowcache           Invalidate the row cache
    join                         Join the ring
    listsnapshots                Lists all the snapshots along with the size on disk and true size.
    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
    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
    refresh                      Load newly placed SSTables to the system without restart
    refreshsizeestimates         Refresh system.size_estimates
    reloadlocalschema            Reload local node schema from system tables
    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
    replaybatchlog               Kick off batchlog replay and wait for finish
    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
    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
    setcompactionthreshold       Set min and max compaction thresholds for a given table
    setcompactionthroughput      Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling
    setconcurrentcompactors      Set number of concurrent compactors in the system.
    sethintedhandoffthrottlekb   Set hinted handoff throttle in kb per second, per delivery thread.
    setinterdcstreamthroughput   Set the Mb/s throughput cap for inter-datacenter streaming in the system, or 0 to disable throttling
    setlogginglevel              Set the log level threshold for a given class. If both class and level are empty/null, it will reset to the initial configuration
    setstreamthroughput          Set the Mb/s throughput cap for 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
    snapshot                     Take a snapshot of specified keyspaces or a snapshot of the specified table
    status                       Print cluster information (state, load, IDs, ...)
    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
    statusthrift                 Status of thrift server
    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 for a given column family
    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.

results matching ""

    No results matching ""