Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Shell Aliases

After running source env.sh, you get access to several helpful aliases and functions for managing your cluster.

SSH Aliases

SSH aliases for all Cassandra nodes are automatically created as c0-cN. The ssh command is not required. For example:

c0 nodetool status

This runs nodetool status on the first Cassandra node.

Cluster Management Functions

CommandDescription
c-allExecutes a command on every node in the cluster sequentially
c-startStarts Cassandra on all nodes
c-restartRestarts Cassandra on all nodes (not a graceful operation)
c-statusExecutes nodetool status on db0
c-tpstatsExecutes nodetool tpstats on all nodes
c-collect-artifactsCollects metrics, nodetool output, and system information

Examples

Run a command on all nodes

c-all "df -h"

Check cluster status

c-status

Collect artifacts for performance testing

c-collect-artifacts my-test-run

This is useful when doing performance testing to capture the state of the system at a given moment.

Graceful Rolling Restarts

For true rolling restarts, we recommend using cstar instead of c-restart.