HOTKEYS GET
HOTKEYS GET
- Available since:
- Redis Open Source 8.6.0
- Time complexity:
- O(K) where K is the number of hotkeys returned.
- ACL categories:
-
@admin,@slow,@dangerous,
Returns tracking results and metadata from the current or most recent hotkeys tracking session.
This command returns comprehensive information about the hotkeys tracking session, including:
- Tracking metadata (start time, duration, sample ratio, etc.)
- Performance statistics (CPU time, network bytes)
- Lists of top K hotkeys sorted by the metrics specified in
HOTKEYS START
Example
HOTKEYS GET
1) "tracking-active"
2) (integer) 1
3) "sample-ratio"
4) (integer) 1
5) "selected-slots"
6) (empty array)
7) "all-commands-all-slots-us"
8) (integer) 220
9) "net-bytes-all-commands-all-slots"
10) (integer) 200
11) "collection-start-time-unix-ms"
12) (integer) 1769420604522
13) "collection-duration-ms"
14) (integer) 6408
15) "total-cpu-time-user-ms"
16) (integer) 3
17) "total-cpu-time-sys-ms"
18) (integer) 11
19) "by-cpu-time-us"
20) 1) "x"
2) (integer) 104
3) "y"
4) (integer) 98
5) "z"
6) (integer) 18
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ❌ Standard |
❌ Standard |
Return information
One of the following:
Array reply when tracking data is available, containing pairs of field names and values:
tracking-active(integer): 1 if tracking is active, 0 if stoppedsample-ratio(integer): The sampling ratio used during trackingselected-slots(array): Array of slot numbers being tracked (empty if all slots)sampled-commands-selected-slots-us(integer): Time in microseconds for sampled commands on selected slots (conditional)all-commands-selected-slots-us(integer): Time in microseconds for all commands on selected slots (conditional)all-commands-all-slots-us(integer): Time in microseconds for all commands on all slotsnet-bytes-sampled-commands-selected-slots(integer): Network bytes for sampled commands on selected slots (conditional)net-bytes-all-commands-selected-slots(integer): Network bytes for all commands on selected slots (conditional)net-bytes-all-commands-all-slots(integer): Network bytes for all commands on all slotscollection-start-time-unix-ms(integer): Unix timestamp in milliseconds when tracking startedcollection-duration-ms(integer): Duration of tracking in millisecondsused-cpu-sys-ms(integer): System CPU time used in millisecondsused-cpu-user-ms(integer): User CPU time used in millisecondstotal-net-bytes(integer): Total network bytes processedby-cpu-time-us(array): Array of key-time pairs sorted by CPU time in microseconds (if CPU tracking enabled)by-net-bytes(array): Array of key-bytes pairs sorted by network bytes (if NET tracking enabled)
Null reply when no tracking has been started or data has been reset.