Skip to content

Instantly share code, notes, and snippets.

@warmans
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warmans/292b2632c8a98f925954 to your computer and use it in GitHub Desktop.
Save warmans/292b2632c8a98f925954 to your computer and use it in GitHub Desktop.
Cassandra Useful Commands
# Show the latency across keyspaces
nodetool cfstats | grep "Latency"
# Identify how many replicas have a row
# 1. use cassandra-cli to identify row key (connect <host>/<port>; use <keyspace>; list <table> limit 1;)
# 2. copy key into: nodetool getendpoints -- <keyspace> <table> <key>
#Node Exceptions
nodetool info | grep Exceptions
#Flappyness
egrep -oh "/.+ is now DOWN" /var/log/cassandra/system.log* | sort | uniq -c | sort -g
#Heap is too full
egrep -h "Heap size.+" /var/log/cassandra/system.log*
#Slow STW collections
egrep -oh "].+ParNew: [0-9]{5,}.+" /var/log/cassandra/system.log*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment