Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TENANT.STATS

Last updated
TENANT.STATS id
Group
Tenancy
Complexity
O(1)
Arity
2 (exactly, counting the command name)
Flags
admin, read-only, fast
HotKV Cloud
Scale
On-Premise
requires the multi-tenancy license feature

TENANT.STATS returns the usage figures this node keeps for a tenant, together with the memory and key quota values set with TENANT.CREATE. Usage figures are per node. The quota values are informational: HotKV does not enforce them on client commands. The usage figures are not updated by client traffic, so they read 0.

Nil (RESP2) or null (RESP3) when the tenant does not exist. Otherwise a flat array of field and value pairs, in RESP2 and RESP3, all values integers:

Field Meaning
memory_bytes Memory usage figure
memory_limit The MAX_MEMORY value (0 for unlimited)
key_count Key usage figure
key_limit The MAX_KEYS value (0 for unlimited)
active_connections Connection usage figure
total_commands Command count
total_bytes_in Incoming bytes
total_bytes_out Outgoing bytes
total_errors Error count

Without a license that includes multi-tenancy, the reply is NOLICENSE multi-tenancy requires a HotKV license. Contact sales@hotkv.com.

127.0.0.1:6379> TENANT.STATS acme
1) "memory_bytes"
2) (integer) 0
3) "memory_limit"
4) (integer) 1073741824
5) "key_count"
6) (integer) 0
7) "key_limit"
8) (integer) 1000000
9) "active_connections"
10) (integer) 0
11) "total_commands"
12) (integer) 0
13) "total_bytes_in"
14) (integer) 0
15) "total_bytes_out"
16) (integer) 0
17) "total_errors"
18) (integer) 0

HotKV-only command.

TENANT.INFO, TENANT.CREATE