Daemon: resources
cua.daemon.v1 resource messages: processor, memory and disk of this Mac, its extra Spaces and your other computers.
What SpaceService.GetResources and WatchResources return: one snapshot, then updates and the low-disk warning. Numbers only.
Source: libs/cua/proto/cua/daemon/v1/resources.proto.
Types in cua/daemon/v1/resources.proto#
GetResourcesRequest#
Request for SpaceService.GetResources.
| Field | # | Type | Description |
|---|---|---|---|
visible | 1 | bool | A window shows the numbers: sample every 10 seconds for the next 30. |
GetResourcesResponse#
Response for SpaceService.GetResources.
| Field | # | Type | Description |
|---|---|---|---|
snapshot | 1 | ResourcesSnapshot | Everything, now. |
WatchResourcesRequest#
Request for SpaceService.WatchResources.
| Field | # | Type | Description |
|---|---|---|---|
visible | 1 | bool | A window shows the numbers (sample every 10 seconds) rather than only the menu bar warning (every 5 minutes). |
WatchResourcesResponse#
One event of SpaceService.WatchResources.
| Field | # | Type | Description |
|---|---|---|---|
snapshot | 1 | ResourcesSnapshot (oneof event) | Everything, once at the start. |
update | 2 | ResourcesUpdate (oneof event) | Only what changed. |
low_disk | 3 | DiskWarning (oneof event) | The free-disk warning level changed. |
ResourcesSnapshot#
One sample of everything.
| Field | # | Type | Description |
|---|---|---|---|
sequence | 1 | uint64 | Grows by one per sample. |
sampled_at_ms | 2 | uint64 | When it was sampled, in Unix milliseconds. |
this_mac | 3 | ComputerResources | This computer. |
spaces | 4 | repeated SpaceResources | The extra Spaces on this computer (the local ones). |
computers | 5 | repeated ComputerResources | Your other computers that published a summary (through the relay). |
warning | 6 | DiskWarning | this_mac.warning, for the menu bar. |
ResourcesUpdate#
What changed since the receiver's last update, past the thresholds.
| Field | # | Type | Description |
|---|---|---|---|
sequence | 1 | uint64 | The sample it brings the receiver to. |
sampled_at_ms | 2 | uint64 | When it was sampled, in Unix milliseconds. |
this_mac | 3 | optional ComputerResources | This computer, when it changed. |
spaces | 4 | repeated SpaceResources | Extra Spaces that changed or appeared: replace by id. |
computers | 5 | repeated ComputerResources | Other computers that changed or appeared: replace by id. |
removed | 6 | repeated string | Ids (Spaces or computers) that are gone. |
DiskWarning#
The low-disk signal.
| Field | # | Type | Description |
|---|---|---|---|
level | 1 | string | ok, low (under 50 GB or 15% of the volume, whichever line is higher, capped at 100 GB) or critical (under the floor where creates fail, 5 GiB unless CUA_DISK_MIN_FREE says otherwise). |
free | 2 | uint64 | Free bytes on the volume that holds Spaces. |
total | 3 | uint64 | Size of that volume in bytes. |
threshold | 4 | uint64 | The line that was crossed in bytes (0 when ok). |
ComputerResources#
A computer: this one, or one of your other computers.
| Field | # | Type | Description |
|---|---|---|---|
id | 1 | string | this-mac, or the relay machine id. |
name | 2 | string | Display name (empty for this computer). |
online | 3 | bool | Reachable now (always true for this computer). |
sampled_at_ms | 4 | uint64 | When the computer measured this, in Unix milliseconds (another computer's can be minutes old). |
cpu_count | 5 | uint32 | Processor cores. |
cpu_percent | 6 | double | Busy now, 0 to 100. |
load_average_1m | 7 | double | 1-minute load average. |
memory_total | 8 | uint64 | Memory size in bytes. |
memory_used | 9 | uint64 | Memory in use in bytes, without reclaimable cache. |
disk_total | 10 | uint64 | Size of the volume that holds Spaces in bytes. |
disk_free | 11 | uint64 | Free bytes on that volume. |
spaces_count | 12 | uint32 | Extra Spaces on it. |
spaces_running | 13 | uint32 | Of those, running. |
spaces_cpu_allocated | 14 | uint32 | Cores given to the running ones. |
spaces_memory_allocated | 15 | uint64 | Memory given to the running ones in bytes. |
spaces_memory_used | 16 | uint64 | Memory the running guests report in use in bytes. |
spaces_disk_bytes | 17 | uint64 | Bytes all its extra Spaces take on it. |
spaces_disk_exact | 18 | bool | False when some Space's disk could only be estimated. |
warning | 19 | DiskWarning | The low-disk signal. |
GuestUsage#
What cua.env.v1.SystemService.Metrics reports from inside a Space.
| Field | # | Type | Description |
|---|---|---|---|
cpu_count | 1 | uint32 | Cores the guest sees. |
cpu_percent | 2 | double | Busy now, 0 to 100. |
load_average_1m | 3 | double | 1-minute load average. |
memory_used | 4 | uint64 | Memory in use in bytes. |
memory_total | 5 | uint64 | Memory size in bytes. |
memory_limited | 6 | bool | memory_total is the guest's own limit. |
disk_used | 7 | uint64 | Disk in use in bytes. |
disk_total | 8 | uint64 | Disk size in bytes. |
disk_limited | 9 | bool | disk_total is the guest's own disk. |
DiskOnHost#
What a Space costs this computer's disk, as opposed to what the guest sees.
| Field | # | Type | Description |
|---|---|---|---|
bytes | 1 | optional uint64 | Bytes only this Space holds: what deleting it frees. Unset when they could not be measured. |
allocated | 2 | uint64 | Blocks its files occupy, clones counted in full: an upper bound. |
shares_space | 3 | bool | Part of it is shared with other copies. |
SpaceResources#
One extra Space on this computer.
| Field | # | Type | Description |
|---|---|---|---|
id | 1 | string | The Space id, for example local:aurora. |
power_state | 2 | string | running, stopped, suspended, or empty when unknown. |
cpu_allocated | 3 | uint32 | Cores given to it (0: unknown). |
memory_allocated | 4 | uint64 | Memory given to it in bytes (0: unknown). |
disk_allocated | 5 | uint64 | Its disk's size limit in bytes (0: unknown). |
usage | 6 | GuestUsage | The guest's own numbers; unset while it is off or unreachable. |
disk_on_host | 7 | DiskOnHost | What it costs this computer; unset for a container. |