0

When a Redis instance is setup and running, the dataset size (in bytes) can be retrieved from output of the below command by looking at used_memory_dataset field.

./redis-cli -h <ip address> -p <port> info

However, when I have multiple instances running in the cluster mode, how do I retrieve the dataset size across the cluster? Can redis-cli tool still be used for such cluster-based commands?

pree
  • 2,297
  • 6
  • 37
  • 55

1 Answers1

3

As of Redis v5 the cli includes cluster-smarts. You can use the following form to call a command, e.g. INFO, on all nodes:

redis-cli --cluster call ip:port command

To calculate the dataset's total size, you'd have to add up the different replies.

Itamar Haber
  • 47,336
  • 7
  • 91
  • 117