nodetool tablestats

Returns statistics about one or more tables.

Returns statistics about one or more tables. Statistics are updated after SSTables change through compaction or flushing. Formerly nodetool cfstats.
Tip: DataStax Enterprise uses the metrics-core library to make the output more informative and easier to understand.
Table 1. nodetool tablestats output for a single table
Name of statistic Example value Description
Keyspace libdata Name of the keyspace.
Table libout Name of this table.
SSTable count 3 Number of SSTables containing data for this table. See Table statistics.
Space used (live) 9592399 Total number of bytes of disk space used by all active SSTables belonging to this table. See .
Space used (total) 9592399 Total number of bytes of disk space used by SSTables belonging to this table, including obsolete SSTables waiting for GC management. See .
Space used by snapshots (total) 0 Total number of bytes of disk space used by snapshot of this table's data. See .
Off heap memory used (total) Total number of bytes of off heap memory used for memtables, Bloom filters, index summaries and compression metadata for this table.
SSTable Compression Ratio 0.367… Ratio of size of compressed SSTable data to its uncompressed size. See compression options.
Number of partitions (estimate) 3 The estimated number of partition keys for this table. Not the number of primary keys.
Memtable cell count 1022550 Number of cells (storage engine rows x columns) of data in the memtable for this table. See .
Memtable data size 32028148 Total number of bytes in the memtable for this table. Total amount of live data stored in the memtable, excluding any data structure overhead.
Memtable off heap memory used 0 Total number of bytes of off-heap data for this memtable, including column related overhead and partitions overwritten. The maximum amount is set in cassandra.yaml by the property memtable_offheap_space_in_mb.
Memtable switch count 3 Number of times a full memtable for this table was swapped for an empty one. Increases each time the memtable for a table is flushed to disk. See How memtables are measured article.
Local read count 11207 Number of requests to read tables in the keyspace since startup.
Local read latency 0.048 ms Round trip time in milliseconds to complete the most recent request to read the table. See
Local write count 17598 Number of local requests to update the table since startup.
Local write latency 0.054 ms Round trip time in milliseconds to complete an update to the table. See
Pending flushes 0 Estimated number of reads, writes, and cluster operations pending for this table.
Important: Monitor this metric to watch for blocked or overloaded memtable flush writers. The nodetool tpstats tool does not report on blocked flushwriters.
Percent repaired 100.0 Percentage of data (uncompressed) marked as repaired across all non-system tables on a node. Tables with a replication factor of 1 are excluded.
Bytes repaired 0.000KiB Size of table data repaired on disk.
Bytes unrepaired 0.000KiB Size of table data unrepaired on disk.
Bytes pending repair 0.000KiB Size of table data isolated for an ongoing incremental repair.
Bloom filter false positives 0 Number of false positives reported by this table's Bloom filter. See Tuning bloom filters.
Bloom filter false ratio 0.00000 Fraction of all bloom filter checks resulting in a false positive from the most recent read.
Bloom filter space used, bytes 11688 Size in bytes of the bloom filter data for this table.
Bloom filter off heap memory used 8 The number of bytes of offheap memory used for Bloom filters for this table.
Index summary off heap memory used 41 The number of bytes of off heap memory used for index summaries for this table.
Compression metadata off heap memory used 8 The number of bytes of off heap memory used for compression offset maps for this table.
Compacted partition minimum 1110 Size in bytes of the smallest compacted partition for this table
Compacted partition maximum bytes 126934 Size in bytes of the largest compacted partition for this table.
Compacted partition mean bytes 2730 The average size of compacted partitions for this table.
Average live cells per slice (last five minutes) 0.0 Average number of cells scanned by single key queries during the last five minutes.
Maximum live cells per slice (last five minutes) 0.0 Maximum number of cells scanned by single key queries during the last five minutes.
Average tombstones per slice (last five minutes) 0.0 Average number of tombstones scanned by single key queries during the last five minutes.
Maximum tombstones per slice (last five minutes) 0.0 Maximum number of tombstones scanned by single key queries during the last five minutes.
Dropped mutations 0.0 The number of mutations (INSERT, UPDATE, or DELETE) started on this table but not completed. A high number of dropped mutations can indicate an overloaded node.

Synopsis

nodetool [connection_options] tablestats
[-F json | yaml] [-H] [-i] [--] 
[keyspace_name.table_name ...]
Table 2. Legend
Syntax conventions Description
UPPERCASE Literal keyword.
Lowercase Not literal.
Italics Variable value. Replace with a valid option or user-defined value.
[ ] Optional. Square brackets ( [ ] ) surround optional command arguments. Do not type the square brackets.
( ) Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.
| Or. A vertical bar ( | ) separates alternative elements. Type any one of the elements. Do not type the vertical bar.
... Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.
'Literal string' Single quotation ( ' ) marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.
{ key:value } Map collection. Braces ( { } ) enclose map collections or key value pairs. A colon separates the key and the value.
<datatype1,datatype2> Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.
cql_statement; End CQL statement. A semicolon ( ; ) terminates all CQL statements.
[ -- ] Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.
' <schema> ... </schema> ' Search CQL only: Single quotation marks ( ' ) surround an entire XML schema declaration.
@xml_entity='xml_entity_type' Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrconfig files.

Definition

The short form and long form parameters are comma-separated.

Connection options

-h, --host hostname
The hostname or IP address of a remote node or nodes. When omitted, the default is the local machine.
-p, --port jmx_port
The JMX port number.
-pw, --password jmxpassword
The JMX password for authenticating with secure JMX. If a password is not provided, you are prompted to enter one.
-pwf, --password-file jmx_password_filepath
The filepath to the file that stores JMX authentication credentials.
-u, --username jmx_username
The username for authenticating with secure JMX.

Command arguments

--
Separates an option from an argument that could be mistaken for a option.
-F, --format json | yaml
The format for the output. The default is plain text. The following wait latencies (in ms) are included in the following order: 50%, 75%, 95%, 98%, 99%, Min, and Max.
-H, --human-readable
Display bytes in human readable form: KiB (kibibyte), MiB (mebibyte), GiB (gibibyte), TiB (tebibyte).
-i
Ignore list of tables and display remaining tables.
keyspace_name
The keyspace name.
table_name
The table name.

Examples

Get table metrics on a single table in default format

nodetool tablestats cycling.birthday_list
Total number of tables: 68
----------------
Keyspace : cycling
	Read Count: 0
	Read Latency: NaN ms
	Write Count: 20
	Write Latency: 0.05625 ms
	Pending Flushes: 0
		Table: birthday_list
		SSTable count: 0
		Space used (live): 0
		Space used (total): 0
		Space used by snapshots (total): 0
		Off heap memory used (total): 0
		SSTable Compression Ratio: -1.0
		Number of partitions (estimate): 5
		Memtable cell count: 6
		Memtable data size: 799
		Memtable off heap memory used: 0
		Memtable switch count: 0
		Local read count: 0
		Local read latency: NaN ms
		Local write count: 6
		Local write latency: 0.035 ms
		Pending flushes: 0
		Percent repaired: 100.0
		Bytes repaired: 0.000KiB
		Bytes unrepaired: 0.000KiB
		Bytes pending repair: 0.000KiB
		Bloom filter false positives: 0
		Bloom filter false ratio: 0.00000
		Bloom filter space used: 0
		Bloom filter off heap memory used: 0
		Index summary off heap memory used: 0
		Compression metadata off heap memory used: 0
		Compacted partition minimum bytes: 0
		Compacted partition maximum bytes: 0
		Compacted partition mean bytes: 0
		Average live cells per slice (last five minutes): NaN
		Maximum live cells per slice (last five minutes): 0
		Average tombstones per slice (last five minutes): NaN
		Maximum tombstones per slice (last five minutes): 0
		Dropped Mutations: 0
		Failed Replication Count: null

Get metrics on two tables in yaml format

nodetool tablestats -F yaml cycling.calendar cycling.birthday_list
total_number_of_tables: 68
cycling:
  write_latency_ms: 0.05625
  tables:
    calendar:
      average_tombstones_per_slice_last_five_minutes: .NaN
      bloom_filter_off_heap_memory_used: '0'
      bytes_pending_repair: 0
      memtable_switch_count: 0
      maximum_tombstones_per_slice_last_five_minutes: 0
      memtable_cell_count: 12
      memtable_data_size: '854'
      average_live_cells_per_slice_last_five_minutes: .NaN
      local_read_latency_ms: NaN
      local_write_latency_ms: '0.046'
      pending_flushes: 0
      compacted_partition_minimum_bytes: 0
      local_read_count: 0
      sstable_compression_ratio: -1.0
      dropped_mutations: '0'
      bloom_filter_false_positives: 0
      off_heap_memory_used_total: '0'
      memtable_off_heap_memory_used: '0'
      index_summary_off_heap_memory_used: '0'
      bloom_filter_space_used: '0'
      sstables_in_each_level: []
      compacted_partition_maximum_bytes: 0
      space_used_total: '0'
      local_write_count: 12
      compression_metadata_off_heap_memory_used: '0'
      number_of_partitions_estimate: 3
      bytes_repaired: 0
      maximum_live_cells_per_slice_last_five_minutes: 0
      space_used_live: '0'
      compacted_partition_mean_bytes: 0
      bloom_filter_false_ratio: '0.00000'
      bytes_unrepaired: 0
      percent_repaired: 100.0
      space_used_by_snapshots_total: '0'
    birthday_list:
      average_tombstones_per_slice_last_five_minutes: .NaN
      bloom_filter_off_heap_memory_used: '0'
      bytes_pending_repair: 0
      memtable_switch_count: 0
      maximum_tombstones_per_slice_last_five_minutes: 0
      memtable_cell_count: 6
      memtable_data_size: '799'
      average_live_cells_per_slice_last_five_minutes: .NaN
      local_read_latency_ms: NaN
      local_write_latency_ms: '0.035'
      pending_flushes: 0
      compacted_partition_minimum_bytes: 0
      local_read_count: 0
      sstable_compression_ratio: -1.0
      dropped_mutations: '0'
      bloom_filter_false_positives: 0
      off_heap_memory_used_total: '0'
      memtable_off_heap_memory_used: '0'
      index_summary_off_heap_memory_used: '0'
      bloom_filter_space_used: '0'
      sstables_in_each_level: []
      compacted_partition_maximum_bytes: 0
      space_used_total: '0'
      local_write_count: 6
      compression_metadata_off_heap_memory_used: '0'
      number_of_partitions_estimate: 5
      bytes_repaired: 0
      maximum_live_cells_per_slice_last_five_minutes: 0
      space_used_live: '0'
      compacted_partition_mean_bytes: 0
      bloom_filter_false_ratio: '0.00000'
      bytes_unrepaired: 0
      percent_repaired: 100.0
      space_used_by_snapshots_total: '0'
  read_latency_ms: .NaN
  pending_flushes: 0
  write_count: 20
  read_latency: .NaN
  read_count: 0