Add capacity overview with host resource history
This commit is contained in:
@@ -233,6 +233,29 @@ systemctl status electric-cherry-update.timer
|
||||
journalctl -u electric-cherry-update.service -n 100
|
||||
```
|
||||
|
||||
## Capacity overview
|
||||
|
||||
Open **Capacity** (`/capacity`) to see the same cached estimates used by collection
|
||||
previews. Available totals include hosts ready for the default runtime and latest
|
||||
files for the selected game. **All games** counts shared resources once, including
|
||||
hosts ready for either game; it is not a guarantee that every game fits every host.
|
||||
The host breakdown shows readiness, missing measurements, available ports, learned
|
||||
running/startup allowances, and the resource limiting additional servers.
|
||||
|
||||
Startup slots and queued jobs are fleet-wide, even with a host or game selected.
|
||||
Server estimates use running allowances; provisioning still checks the larger
|
||||
startup allowance before starting each job. Port availability uses each host's
|
||||
configured bind address. Queued unplaced jobs do not reserve physical resources.
|
||||
|
||||
The history graph offers the last hour, 24 hours, or seven days of measured CPU
|
||||
and memory headroom, after the usual OS reserve. It averages each host's reports
|
||||
within each period, then sums hosts for fleet views. Missing reports appear as gaps.
|
||||
Historical measurements cover the selected currently registered hosts and do not
|
||||
reconstruct past readiness, port reservations, or startup slots. Reports refresh
|
||||
automatically while the page is visible, and historical queries run in a separate
|
||||
reader worker. `GET /api/capacity` supports `range=1h|24h|7d`, `host=<host ID>`, and
|
||||
`game=all|t5|t6`; host/game selections also remain in the page URL.
|
||||
|
||||
## Identity, transport and credentials
|
||||
|
||||
Enrollment tokens are random, hashed at rest, single-use and expire after 15
|
||||
|
||||
Reference in New Issue
Block a user