suujana.naga16_165607 avatar image
suujana.naga16_165607 asked Erick Ramirez commented

How do I calculate reads on a table for the last 24 hrs?

I need to calculate reads on particular table for last 24 hrs..while nodetool tablestats gives data since the last restart of the node and also for same table read values are different on all other nodes in cluster. Does nodetool tablestats gives data for entire cluster or for that particular node? Can i consider ( sum of Local read count on a table from all nodes = total no. of reads on that table ) ?.

Ex: for 3 node cluster : nodetool cfstats Local read count values for a table on 3 nodes are like 2 , 3 and 6

( 2+ 3 + 6 ) = 11 --> total no. of reads on that table?

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

It depends on which statistics you are after but the best you can do is get an estimate.

The "getter" commands from nodetool provide information about the local node with few exceptions such as describecluster and status.

The local read count in the output of tablestats is the replica read requests on the node. If you add up the local read counts from all nodes, you get the total reads from all replicas. You'll need to do some calculations to get an estimate for the last 24 hours based on the uptime on each node.

If you are after the total read requests from the application, you will need to check your monitoring for that information. If you don't have monitoring configured, there's no way to get this metric.

For open-source Cassandra, we recommend using the DataStax Metrics Collector for Apache Cassandra (MCAC). Cheers!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

suujana.naga16_165607 avatar image suujana.naga16_165607 commented ·
yes , we do have monitoring enabled through opcenter...! how can get total no. of reads for last 24 hrs? The graph is giving me avg values.
0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ suujana.naga16_165607 commented ·
If you're using OpsCenter already then you can specify the time period in the metrics graph for read count.

If you need someone to show you how, please log a ticket with DataStax Support so one of our engineers can assist you directly. Cheers!

0 Likes 0 ·