HOTKEYS START

HOTKEYS START METRICS count [CPU] [NET] [COUNT k] [DURATION seconds] [SAMPLE ratio] [SLOTS count slot [slot ...]]
Available since:
Redis Open Source 8.6.0
Time complexity:
O(1)
ACL categories:
@admin, @slow, @dangerous,

Starts hotkeys tracking with specified metrics.

This command initiates a hotkey tracking session. You must specify which metrics to track using the required METRICS parameter. An error is returned if a tracking session is already in progress.

The tracking session continues until manually stopped with HOTKEYS STOP or automatically stopped after the specified duration.

Arguments

METRICS count [CPU] [NET]

Required. Specifies which metrics to track and how many hotkeys to track.

  • count - The number of metrics to collect (required).
  • CPU - Track hotkeys by CPU time percentage (optional).
  • NET - Track hotkeys by network bytes percentage (optional).

At least one of CPU or NET must be specified.

Optional arguments

COUNT

Specifies the value of K for the top-K hotkeys tracking.

DURATION

The 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.

SAMPLE

Sampling 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.

SLOTS

Specifies 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.

Redis Enterprise and Redis Cloud compatibility

Redis
Enterprise
Redis
Cloud
Notes
❌ Standard
❌ Active-Active
❌ Standard
❌ Active-Active

Return information

One of the following:

RATE THIS PAGE
Back to top ↑