{
  "schema_version": 2,
  "id": "commands/cluster-slot-stats",
  "title": "CLUSTER SLOT-STATS",
  "url": "https://redis.io/docs/latest/commands/cluster-slot-stats/",
  "summary": "Return an array of slot usage statistics for slots assigned to the current node.",
  "since": "8.2.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "07fce19d1c9590920259b5fa4fdcead1943bfdcb79967dc77b95ef03ba8b53f4",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Use this command to get an array of slot usage statistics for the slots assigned to the current shard. If you're working with a Redis cluster, this data helps you understand overall slot usage, spot hot or cold slots, plan slot migrations to balance load, or refine your application logic to better distribute keys."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "Specify exactly one of the following to select which slots to report on.\n\n<details open><summary><code>SLOTSRANGE start-slot end-slot</code></summary>\n\nLimits the results to a specific, inclusive range of slots. Results are always sorted by slot number in ascending order.\n\n</details>\n\n<details open><summary><code>ORDERBY metric [LIMIT limit] [ASC | DESC]</code></summary>\n\nSorts the slot statistics by the specified `metric`. Use `ASC` or `DESC` to sort in ascending or descending order, and `LIMIT` to limit the number of results returned. If multiple slots have the same value, the command uses the slot number as a tiebreaker, sorted in ascending order.\n\n`metric` is one of the statistics reported for each slot:\n\n- `KEY-COUNT`: Number of keys stored in the slot.\n- `CPU-USEC`: CPU time (in microseconds) spent handling the slot.\n- `MEMORY-BYTES`: Number of bytes allocated by the slot.\n- `NETWORK-BYTES-IN`: Total inbound network traffic (in bytes) received by the slot.\n- `NETWORK-BYTES-OUT`: Total outbound network traffic (in bytes) sent from the slot.\n\n</details>\n\n> [!NOTE]\n> All metrics except `KEY-COUNT` require that `cluster-slot-stats-enabled` is set to `yes` in the `redis.conf` file."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n* [Array reply](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays): a nested list of slot usage statistics.\n* [Simple error](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) otherwise.\n\n**RESP3:**\n\nOne of the following:\n\n* [Array reply](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays): a nested list of slot usage statistics.\n* [Simple error](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) otherwise."
    }
  ],
  "examples": []
}
