Lisandro Pin
187ef65e8f
Humanize output for weed.server by default (#7758)
* Implement a `weed shell` command to return a status overview of the cluster.
Detailed file information will be implemented in a follow-up MR. Note also
that masters are currently not reporting back EC shard sizes correctly, via
`master_pb.VolumeEcShardInformationMessage.shard_sizes`.
F.ex:
```
> status
cluster:
id: topo
status: LOCKED
nodes: 10
topology: 1 DC(s)s, 1 disk(s) on 1 rack(s)
volumes:
total: 3 volumes on 1 collections
max size: 31457280000 bytes
regular: 2/80 volumes on 6 replicas, 6 writable (100.00%), 0 read-only (0.00%)
EC: 1 EC volumes on 14 shards (14.00 shards/volume)
storage:
total: 186024424 bytes
regular volumes: 186024424 bytes
EC volumes: 0 bytes
raw: 558073152 bytes on volume replicas, 0 bytes on EC shard files
```
* Humanize output for `weed.server` by default.
Makes things more readable :)
```
> cluster.status
cluster:
id: topo
status: LOCKED
nodes: 10
topology: 1 DC, 10 disks on 1 rack
volumes:
total: 3 volumes, 1 collection
max size: 32 GB
regular: 2/80 volumes on 6 replicas, 6 writable (100%), 0 read-only (0%)
EC: 1 EC volume on 14 shards (14 shards/volume)
storage:
total: 172 MB
regular volumes: 172 MB
EC volumes: 0 B
raw: 516 MB on volume replicas, 0 B on EC shards
```
```
> cluster.status --humanize=false
cluster:
id: topo
status: LOCKED
nodes: 10
topology: 1 DC(s), 10 disk(s) on 1 rack(s)
volumes:
total: 3 volume(s), 1 collection(s)
max size: 31457280000 byte(s)
regular: 2/80 volume(s) on 6 replica(s), 5 writable (83.33%), 1 read-only (16.67%)
EC: 1 EC volume(s) on 14 shard(s) (14.00 shards/volume)
storage:
total: 172128072 byte(s)
regular volumes: 172128072 byte(s)
EC volumes: 0 byte(s)
raw: 516384216 byte(s) on volume replicas, 0 byte(s) on EC shards
```
Also adds unit tests, and reshuffles test files handling for clarity.
2025-12-15 11:18:45 -08:00
..
2025-12-13 19:04:12 -08:00
2025-11-26 11:29:55 -08:00
2025-12-14 23:40:01 -08:00
2025-12-05 12:19:06 -08:00
2025-12-14 23:40:01 -08:00
2025-10-17 22:11:50 -07:00
2025-10-13 18:05:17 -07:00
2025-12-14 18:48:39 -08:00
2025-12-14 16:08:56 -08:00
2024-04-24 23:16:04 -07:00
2025-08-22 22:10:30 -07:00
2025-12-10 12:45:04 -08:00
2025-11-29 10:06:11 -08:00
2025-12-08 15:39:35 -08:00
2025-12-10 00:54:34 -08:00
2025-12-14 18:48:39 -08:00
2025-11-29 10:06:11 -08:00
2025-10-28 22:16:21 -07:00
2025-10-28 22:16:21 -07:00
2025-12-14 21:56:07 -08:00
2025-08-06 10:08:30 -07:00
2024-06-25 09:18:11 -07:00
2025-12-14 21:56:07 -08:00
2025-12-08 01:24:42 -08:00
2025-12-15 11:18:45 -08:00
2024-02-14 08:26:38 -08:00
2025-11-26 15:51:38 -08:00
2025-12-14 21:26:05 -08:00
2025-07-16 23:39:27 -07:00
2025-12-08 07:55:42 -08:00
2025-12-15 01:06:55 -08:00
2025-12-13 20:06:13 -08:00
2025-12-02 12:30:15 -08:00
2025-11-29 11:36:22 -08:00
2025-03-17 23:13:27 -07:00