I have a 19-node Cassandra cluster for our internal service. If I log into a node using nodetool and run commands like tablestats, etc, does that gather stats just for that particular node or for the entire cluster?
Asked
Active
Viewed 1,173 times
2 Answers
3
Most nodetool commands operate on a single node in the cluster if -h is not used to identify one or more other nodes. If the node from which you issue the command is the intended target, you do not need the -h option to identify the target; otherwise, for remote invocation, identify the target node, or nodes, using -h.

undefined_variable
- 6,180
- 2
- 22
- 37
-
Thank you, so if I need to get stats for the entire cluster, then I add each node with a -h and nodetool will do the math to get me the aggregated values? – Ste Feb 06 '18 at 19:05
-
how to specify multiple nodes using -h? – GodBlessYou Nov 01 '19 at 16:20
3
nodetool
utility for cassandra gather for entire cluster, not a single node.
For example, if you run command like-
command:
nodetool tablestats musicdb.artist
result:
Keyspace: musicdb
Read Count: 0
Read Latency: NaN ms.
Write Count: 0
Write Latency: NaN ms.
Pending Flushes: 0
Table: artist
SSTable count: 1
Space used (live): 62073
Space used (total): 62073
Space used by snapshots (total): 0
Off heap memory used (total): 1400
SSTable Compression Ratio: 0.27975344141453456
Number of keys (estimate): 1000
Memtable cell count: 0
Memtable data size: 0
Memtable off heap memory used: 0
Memtable switch count: 0
Local read count: 0
Local read latency: NaN ms
Local write count: 0
Local write latency: NaN ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 1264
Bloom filter off heap memory used: 1256
Index summary off heap memory used: 128
Compression metadata off heap memory used: 16
Compacted partition minimum bytes: 104
Compacted partition maximum bytes: 149
Compacted partition mean bytes: 149
Average live cells per slice (last five minutes): 0.0
Maximum live cells per slice (last five minutes): 0
Average tombstones per slice (last five minutes): 0.0
Maximum tombstones per slice (last five minutes): 0
Status of the table artist
belongs to keyspace musicdb
above is from the entire cluster.

Anower Perves
- 754
- 8
- 15
-
I ran the command on 3 data nodes and return different space used. – GodBlessYou Nov 01 '19 at 16:21
-
try this command on the DC2 node. If your replication factor is 3 for DC1 and 1 for DC2 then your DC2 node will return the entire space used for the above command. – Anower Perves Nov 04 '19 at 09:33