cloud storage¶
NAME¶
phyware cloud storage — show PhyCloud hot-store and archive usage.
SYNOPSIS¶
DESCRIPTION¶
Shows how much of the hot store a tenant uses and what retention has done: event count, payload bytes, the oldest and newest event, where the hot chain starts, what has been archived, the policy, and the last run.
Without options it shows your own tenant (events:read). --tenant shows another tenant and --all shows every active tenant with totals; both need admin:tenants.
OPTIONS¶
| Flag | Type | Required | Default | Env |
|---|---|---|---|---|
--url | string | No | http://localhost:8000 | PHYCLOUD_URL |
--api-key | string | No | — | PHYCLOUD_API_KEY |
--output | enum | No | table | — |
| Flag | Type | Required | Description |
|---|---|---|---|
--tenant | string | No | Tenant ID (admin:tenants) |
--all | bool | No | Every active tenant, with totals (admin:tenants) |
INPUT¶
None.
OUTPUT¶
| Field | Type | Description |
|---|---|---|
events | integer | Events in the hot store |
payload_bytes | integer | Sum of event payload sizes |
oldest_ingested_at | string | Oldest event in the hot store |
checkpoint | object | Where the hot chain starts, or null |
archive | object | Archived segments, events and bytes |
policy_action | string | delete, archive_then_delete, or null |
last_run | object | Most recent retention run |
EXIT CODES¶
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic / connection error |
2 | Authentication / authorisation error |
3 | Resource not found |
4 | Validation error |
5 | Server-side error |
EXAMPLES¶
# Your own tenant
phyware cloud storage
# One tenant (admin)
phyware cloud storage --tenant acme
# Every tenant
phyware cloud storage --all
# The five largest tenants
phyware cloud storage --all -o json | jq '.tenants | sort_by(-.payload_bytes) | .[:5]'
# Hot bytes only
phyware cloud storage -o json | jq '.payload_bytes'
AGENT NOTES¶
payload_bytes counts event payloads only; indexes and row overhead add to the real on-disk size, which /health reports as retention.database_bytes. The command scans the tenant's events, so do not poll it.
SEE ALSO¶
ERRORS¶
| Code | Message | Remediation |
|---|---|---|
FORBIDDEN | Insufficient scope | Use a key with admin:tenants |
NOT_FOUND | Tenant not found | Check --tenant |