Skip to content

Add monitor --interval=<duration> to configure the scan cadence #75

Description

@gsjonio

What & why

netwp monitor re-scans on a fixed interval (monitorEvery, 10s). A --interval=<duration> flag would let users slow it down on a big/quiet network or speed it up.

Where

  • cmd/netwp/live.go (runMonitor, and the headless runMonitorQuiet) and cmd/netwp/main.go (help text).

Scope

  • Parse --interval=30s with time.ParseDuration; fall back to the current default when absent.
  • Apply a sane floor (e.g. reject sub-second to avoid hammering the network) with a clear error.
  • Pass it into tui.MonitorConfig.Interval and the headless loop's ticker. Document in both READMEs.

Acceptance

  • netwp monitor --interval=30s scans every 30s; bad/too-small values fail fast.
  • Unit test for the duration parse + floor.
  • Full verify suite clean.

Good first issue: isolated flag parse; clear boundary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions