VOLUME.STATS
Returns a volume-wide overview including status, capacity, garbage percentage, and fill ratio.
Syntax
Section titled “Syntax”VOLUME.STATS <volume-name>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
volume-name | string | Name of the volume, in <kind>-shard-<id> format (e.g. bucket-shard-0) |
Return Value
Section titled “Return Value”RESP3 map with the following fields:
| Field | Type | Description |
|---|---|---|
status | string | Operational status: READWRITE, READONLY, or INOPERABLE |
segment_count | integer | Number of segments in the volume |
total_size_bytes | integer | Sum of all segment sizes in bytes |
used_bytes | integer | Total bytes occupied by live entries across all segments |
free_bytes | integer | Total unallocated bytes across all segments |
garbage_bytes | integer | Total reclaimable bytes across all segments |
garbage_percentage | double | Fraction of total capacity occupied by garbage: garbage_bytes / total_size_bytes |
fill_ratio | double | Fraction of total capacity that has been written: (used_bytes + garbage_bytes) / total_size_bytes |
total_cardinality | integer | Total number of live entries across all segments |
Behavior
Section titled “Behavior”Looks up the volume by name and analyzes all segments. Aggregates per-segment metrics into volume-wide totals.
The following invariant holds:
total_size_bytes - free_bytes == used_bytes + garbage_bytesWhen total_size_bytes is zero (no segments), both garbage_percentage and fill_ratio return 0.0.
When no subcommand is specified, VOLUME.STATS defaults to this overview. The available subcommands are:
| Subcommand | Description |
|---|---|
OPCOUNTERS | In-memory operation counters |
SEGMENTS | Per-segment statistics |
REPLICATION | Replication state for a specific standby |
RESET | Reset counters |
This command is available on the management port (default 3320).
Errors
Section titled “Errors”| Condition | Message |
|---|---|
| Volume name parameter is missing | ERR wrong number of arguments for 'VOLUME. |
| No volume with that name is managed by this member | ERR Volume: '<name>' is not open |
| Unknown subcommand | ERR unknown subcommand '<subcommand>' |
Examples
Section titled “Examples”Overview of a volume with one segment:
127.0.0.1:3320> VOLUME.STATS bucket-shard-01# "status" => "READWRITE"2# "segment_count" => (integer) 13# "total_size_bytes" => (integer) 10485764# "used_bytes" => (integer) 1005# "free_bytes" => (integer) 10484766# "garbage_bytes" => (integer) 07# "garbage_percentage" => (double) 0.08# "fill_ratio" => (double) 9.5367431640625e-059# "total_cardinality" => (integer) 10Empty volume (no segments):
127.0.0.1:3320> VOLUME.STATS bucket-shard-01# "status" => "READWRITE"2# "segment_count" => (integer) 03# "total_size_bytes" => (integer) 04# "used_bytes" => (integer) 05# "free_bytes" => (integer) 06# "garbage_bytes" => (integer) 07# "garbage_percentage" => (double) 0.08# "fill_ratio" => (double) 0.09# "total_cardinality" => (integer) 0Volume not found:
127.0.0.1:3320> VOLUME.STATS non-existent-volume(error) ERR Volume: 'non-existent-volume' is not open