cassandra commands

15 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 15 shown

  • nodetool status

    Show ring topology, load, state, and host IDs

    monitoring

  • nodetool info

    Local node heap, uptime, gossip, data center info

    monitoring

  • cqlsh <host> 9042 -u cassandra -p cassandra

    Open CQL interactive shell

  • cqlsh -e 'DESCRIBE KEYSPACES'

    Show all keyspaces in the cluster

  • nodetool repair -pr <keyspace>

    Run incremental repair on the primary range (use in maintenance)

  • nodetool compactionstats

    Show ongoing compaction operations and queue length

    monitoring

  • nodetool flush <keyspace> <table>

    Force memtable flush to SSTables

  • cqlsh -e 'DESCRIBE TABLE <keyspace>.<table>'

    Show CREATE TABLE statement with all settings

  • nodetool status

    Show cluster ring with status, load and ownership

  • nodetool compactionstats

    Show pending and active compaction tasks

    monitoring

  • cqlsh -u cassandra -p cassandra -e 'DESCRIBE KEYSPACES;'

    Execute a CQL statement non-interactively

  • nodetool tablestats mykeyspace.mytable

    Show read/write latencies and SSTable count for a table

    monitoring

  • nodetool repair -full mykeyspace

    Full repair to sync all replicas for a keyspace

  • nodetool gossipinfo

    Show gossip state for all nodes (debug)

    debug

  • nodetool flush mykeyspace

    Force flush in-memory data to SSTables