{
  "schema_version": 2,
  "id": "commands/hotkeys-start",
  "title": "HOTKEYS START",
  "url": "https://redis.io/docs/latest/commands/hotkeys-start/",
  "summary": "Starts hotkeys tracking.",
  "since": "8.6.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:09+01:00",
  "page_type": "content",
  "content_hash": "52e25dae8b1ef48d06e17202e1666032917869d96dd5b17168d5258fba120a05",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Starts hotkeys tracking with specified metrics.\n\nThis command initiates a hotkey tracking session. You must specify which metrics to track using the required `METRICS` parameter.\nAn error is returned if a tracking session is already in progress.\n\nThe tracking session continues until manually stopped with [`HOTKEYS STOP`](https://redis.io/docs/latest/commands/hotkeys-stop) or automatically stopped after the specified duration."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>METRICS count [CPU] [NET]</code></summary>\n\n**Required.** Specifies which metrics to track and how many hotkeys to track.\n\n- `count` - The number of metrics to collect (required).\n- `CPU` - Track hotkeys by CPU time percentage (optional).\n- `NET` - Track hotkeys by network bytes percentage (optional).\n\nAt least one of `CPU` or `NET` must be specified.\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>COUNT</code></summary>\n\nSpecifies the value of K for the top-K hotkeys tracking.\n\n</details>\n\n<details open><summary><code>DURATION</code></summary>\n\nThe duration in seconds for how long the hotkeys tracking should run. After this time period, tracking will automatically stop. If not specified, tracking continues until manually stopped with `HOTKEYS STOP`.\n\n</details>\n\n<details open><summary><code>SAMPLE</code></summary>\n\nSampling ratio for probabilistic tracking. Each key is sampled with probability `1/ratio`. Higher values reduce performance impact but may miss some hotkeys. Lower values provide more accurate results but with higher performance cost.\n\n</details>\n\n<details open><summary><code>SLOTS</code></summary>\n\nSpecifies which hash slots to track in a cluster environment. Takes a count followed by that many slot numbers. Only keys that hash to the specified slots will be tracked. Useful for tracking hotkeys on specific shards in a Redis cluster. Using `SLOTS` when not in cluster mode will result in an error.\n\n</details>"
    },
    {
      "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=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n- [Simple string](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) reply: `OK` when tracking is successfully started.\n- [Error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors): when invalid parameters are provided.\n\n**RESP3:**\n\nOne of the following:\n\n- [Simple string](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) reply: `OK` when tracking is successfully started.\n- [Error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors): when invalid parameters are provided."
    }
  ],
  "examples": []
}
