content/commands/hotkeys-get.md
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:
HOTKEYS STARTThe following metrics are collected for non-clustered as well as clustered Redis environments:
tracking-active (integer): 1 if tracking is active, 0 if stoppedsample-ratio (integer): The sampling ratio used during trackingselected-slots (array): [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of select slots and slot rangesall-commands-all-slots-us (integer): CPU time in microseconds for all commands on all slotsnet-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 millisecondstotal-cpu-time-user-ms (integer): User CPU time used in milliseconds (only when the CPU metric was specified with HOTKEYS START)total-cpu-time-sys-ms (integer): System CPU time used in milliseconds (only when the CPU metric was specified with HOTKEYS START)total-net-bytes (integer): Total network bytes processed (only when the NET metric was specified with HOTKEYS START)by-cpu-time-us (array): [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of key-time pairs sorted by CPU time in microseconds (only when the CPU metric was specified with HOTKEYS START)by-net-bytes (array): [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of key-bytes pairs sorted by network bytes (only when the NET metric was specified with HOTKEYS START)The following additional results are collected only on clustered Redis environments, when SLOTS was used with HOTKEYS START:
sampled-commands-selected-slots-us (integer): CPU time in milliseconds for sampled commands in selected slots (only when SAMPLE was used with HOTKEYS START)all-commands-selected-slots-us (integer): CPU time in milliseconds for all commands in selected slotsnet-bytes-sampled-commands-selected-slots (integer): Network bytes for sampled commands in selected slots (only when SAMPLE was used with HOTKEYS START)net-bytes-all-commands-selected-slots (integer): Network bytes for all commands on selected slotsNET and CPU metrics specified)HOTKEYS GET
1) 1) "tracking-active"
2) (integer) 0
3) "sample-ratio"
4) (integer) 1
5) "selected-slots"
6) 1) 1) (integer) 0
2) (integer) 16383
7) "all-commands-all-slots-us"
8) (integer) 103
9) "net-bytes-all-commands-all-slots"
10) (integer) 2042
11) "collection-start-time-unix-ms"
12) (integer) 1770824933147
13) "collection-duration-ms"
14) (integer) 0
15) "total-cpu-time-user-ms"
16) (integer) 23
17) "total-cpu-time-sys-ms"
18) (integer) 7
19) "total-net-bytes"
20) (integer) 2038
21) "by-cpu-time-us"
22) 1) "hotkey_001_counter"
2) (integer) 29
3) "hotkey_001"
4) (integer) 25
5) "hotkey_001_hash"
6) (integer) 11
7) "hotkey_001_list"
8) (integer) 9
9) "hotkey_001_set"
10) (integer) 9
23) "by-net-bytes"
24) 1) "hotkey_001"
2) (integer) 446
3) "hotkey_002"
4) (integer) 328
5) "hotkey_001_hash"
6) (integer) 198
7) "hotkey_001_set"
8) (integer) 167
9) "hotkey_001_counter"
10) (integer) 116
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | |
{{< multitabs id="return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
-tab-sep-
One of the following:
{{< /multitabs >}}