cli.monitor

otto monitor — interactive performance dashboard.

Live mode (collects from lab hosts; explicit opt-in, never the default):

otto monitor –live otto monitor –live –hosts ‘router|switch’ otto monitor –live –hosts router1 –interval 5 otto monitor –live –db metrics.db –label “regression run” –note “pre-release smoke”

Review mode (serves a previously saved export; no live collection):

otto monitor metrics.db otto monitor metrics.json

otto.cli.monitor.monitor(ctx: ~typer.models.Context, live: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x738001487310>] = False, hosts: ~types.Annotated[str | None, <typer.models.OptionInfo object at 0x7380014872b0>] | None = None, interval: ~typing.Annotated[float, <typer.models.OptionInfo object at 0x738001485960>] = 5.0, db: ~types.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x738001486680>] | None = None, label: ~types.Annotated[str | None, <typer.models.OptionInfo object at 0x738001487520>] | None = None, note: ~types.Annotated[str | None, <typer.models.OptionInfo object at 0x738001485480>] | None = None, source: ~types.Annotated[~pathlib.Path | None, <typer.models.ArgumentInfo object at 0x738001487e20>] | None = None) None

Launch an interactive performance monitoring dashboard, or review a saved export.

Exactly one of --live or <source> must be given — never both, and never neither (bare otto monitor prints usage and exits 2). Output-dir creation moved to the shared leaf-invoke command_preamble() (monitor’s spec declares output_dir=True), so a --help invocation can never create a spurious dir. Neither the reservation gate nor the lab requirement is uniform: monitor’s spec declares gate=False AND lab_free=True, so this body gates and lab-loads only the --live branch (via ensure_lab_session()) — reviewing a saved <source> is both gate-exempt and lab-free (it reads a local file and never touches live hardware or a lab).