Command reference
oko work resources
Measures what the agent sessions stood on over the window, and with --add N when the work would end with N more sessions, hosts like this one or subscriptions.
Invocation#
oko work resources [--hours N] [--add N] [--all] [--json]Inputs and options#
- The window is --hours, else the longest repair the register timed, rounded up to whole hours.
- The host now: `sysctl -n vm.loadavg`, `sysctl -n hw.ncpu` and the processes `ps -axo state=` shows in uninterruptible wait (U).
- Every live transcript written in the window: each call with its answer and how long the answer took, shaped by each segment's program and first word; Brama judges each shape once as build, version-control, serial-gate or other and the judgment is kept in resource-kinds.json beside the defect register (OKO_RESOURCE_KINDS). Each wait a Wisent program announced in a call's answer (the start, end and failure lines of Stado's wait mechanism) counts toward its kind; the waits nothing answers by itself (a grant, another session, a terminal) count toward the serial gates. A model turn the provider refused with the status the operator named, or his word for it, stands until the session's next record; an ended turn stands until the operator's next message.
Output and state effect#
- Prints {host: {load, cores, uninterruptible, saturated}, sessions, activeSeconds, calls: {<kind>: {seconds, count, share, hoursPerDay}}, callsUnjudged, shapes: {<shape>: {kind, seconds, count, share, hoursPerDay}}, waits: {<kind>: {seconds, count, share, hoursPerDay}}, provider, operator, cargo: {seconds, count, share, hoursPerDay}, builds: [{session, at, callSeconds, shape, profile, cargoSeconds, compiledOko}], okoBuilds: {<profile>: {count, medianSeconds, longestSeconds}}, unread}. cargo is the time of the calls whose answer reported a finished Cargo build, read from Cargo's own `Finished` line with no judgment. Each figure is addressable by a JSON pointer into this answer (`/cargo/hoursPerDay`, `/calls/build/hoursPerDay`, `/shapes/cargo build/seconds`, `/okoBuilds/release/medianSeconds`).
- With --add N, scenarios: {baseHours, shares, bottleneck, rows: [{resource, added, hours, endsAt, gainHours, unchanged, why}]}: N more sessions lay the items on N more queues and, while the host is saturated, slow the building share by the sessions sharing it; N more hosts speed the building share only while the host is saturated, and are unchanged with the load said otherwise; N more subscriptions shrink the provider's capacity refusals over the subscriptions `oko subscriptions snapshot` knows, and are unchanged when the provider refused nothing. The bottleneck is the largest share among the saturated host, the provider, the serial gates and the operator.
Refusals and safe exits#
- “oko work resources: no repair in the register was ever timed from its assignment, so no window is measured; name one with --hours N”.
- “the end is not forecast, so no resource is measured against it: <why>”; “no agent session was active in the window, so no share of its time is measured”.
- A host reading that cannot be read names the command and what it printed. A call shape Brama could not judge is counted as unjudged, with the cause under callsUnjudged.