cfstats

Provides statistics about tables.

Provides statistics about tables.

Synopsis 

nodetool <options> cfstats -i -- (<keyspace>.<table> ... )
  • options are:
    • ( -h | --host ) <host name> | <ip address>
    • ( -p | --port ) <port number>
    • ( -pw | --password ) <password >
    • ( -u | --username ) <user name>
  • -- Separates an option from an argument that could be mistaken for a option.
  • keyspace.table is one or more keyspace and table names in dot notation.
Legend
  • Angle brackets (< >) mean not literal, a variable
  • Italics mean optional
  • The pipe (|) symbol means OR or AND/OR
  • Ellipsis (...) means repeatable

A semicolon that terminates CQL statements is not included in the synopsis.

Description 

The nodetool cfstats command provides statistics about one or more tables. You use dot notation to specify one or more keyspace and table names. If you do not specify a keyspace and table, Cassandra provides statistics about all tables.

This table describes the nodetool cfstats output.
nodetool cfstats output
Name of statistic Example value Brief description Related information
Keyspace libdata Name of the keyspace Keyspace and table
Read count 11207 Number of requests to read tables in the libdata keyspace since startup  
Read latency 0.047931114482020164 ms Latency reading the tables in the libdata keyspace OpsCenter alert metrics
Write count 17598 Number of requests to update tables in the libdata keyspace since startup Same as above
Write latency 0.053502954881236506 ms Latency writing tables in the libdata keyspace Same as above
Pending tasks 0 Tasks in the queue for reads, writes, and cluster operations of tables in the keyspace OpsCenter pending task metrics
Table libout Name of the Cassandra table  
SSTable count 3 Number of SSTables containing data from the table How to use the SSTable counts metric and OpsCenter alert metrics
Space used (live), bytes: 9592399 Space that is measured depends on operating system Advanced system alert metrics
Space used (total), bytes: 9592399 Same as above Same as above
SSTable compression ratio 0.36751363892150946 Fraction of data-representation size resulting from compression Types of compression option)
Memtable cell count 0 Number of cells (storage engine rows x columns) of data in the memtable Cassandra memtable structure in memory
Memtable data size, bytes: 0 Size of the memtable data Same as above
Memtable switch count 3 Number of times a full memtable was swapped for an empty one that increases each time the memtable for a table is flushed to disk How memtables are measured article
Local read count 11207 Number of local read requests for the libout table since startup OpsCenter alert documentation
Local read latency 0.048 ms Round trip time in milliseconds to complete a request to read the libout table Factors that affect read latency
Local write count 17598 Number of local requests to update the libout the table since startup OpsCenter alert documentation
Local write latency 0.054 ms Round trip time in milliseconds to complete an update to the libout table Factors that affect write latency
Pending tasks 0 Number of read, write, and cluster operations that are pending OpsCenter pending task metrics documentation
Bloom filter false positives 0 Number of false positives, which occur when the bloom filter said the row existed, but it actually did not exist in absolute numbers Tuning bloom filters
Bloom filter false ratio 0.00000 Fraction of all bloom filter checks resulting in a false positive Same as above
Bloom filter space used, bytes 11688 Bytes of bloom filter data Same as above
Compacted partition minimum bytes 1110 Lower size limit for the partition being compacted in memory Used to calculate what the approximate row cache size should be. Multiply the reported row cache size, which is the number of rows in the cache, by the compacted row mean size for every table and sum them.
Compacted partition maximum bytes 126934 Upper size limit for compacted table rows, configurable in the cassandra.yaml in_memory_compaction _limit_in_mb Same as above
Compacted partition mean bytes 2730 The average size of compacted table rows Same as above
Average live cells per slice (last five minutes) 0.0    
Average tombstones per slice (last five minutes) 0.0    

Example 

This example shows an excerpt of the output of the command after flushing a table of library data to disk.

Keyspace: libdata
	Read Count: 11207
	Read Latency: 0.047931114482020164 ms.
	Write Count: 17598
	Write Latency: 0.053502954881236506 ms.
	Pending Tasks: 0
		Table: libout
		SSTable count: 3
		Space used (live), bytes: 9088955
		Space used (total), bytes: 9088955
		Space used by snapshots (total), bytes: 0
		SSTable Compression Ratio: 0.36751363892150946
		Memtable cell count: 0
		Memtable data size, bytes: 0
		Memtable switch count: 3
		Local read count: 11207
		Local read latency: 0.048 ms
		Local write count: 17598
		Local write latency: 0.054 ms
		Pending tasks: 0
		Bloom filter false positives: 0
		Bloom filter false ratio: 0.00000
		Bloom filter space used, bytes: 11688
		Compacted partition minimum bytes: 1110
		Compacted partition maximum bytes: 126934
		Compacted partition mean bytes: 2730
		Average live cells per slice (last five minutes): 0.0
		Average tombstones per slice (last five minutes): 0.0