TENANT.STATS
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.
Return value
Section titled “Return value”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.
Examples
Section titled “Examples”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) 011) "total_commands"12) (integer) 013) "total_bytes_in"14) (integer) 015) "total_bytes_out"16) (integer) 017) "total_errors"18) (integer) 0Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.