Skip to content

spawn status / spored status always show CPU, network and disk I/O as "unknown (single sample)" #1090

Closed

Description

@scttfrdmn

Found in the v0.131.1 launch-and-idle test (t4g.small, us-east-1, idle-timeout 10m). Six minutes after launch, spawn status still printed:

CPU:              unknown (single sample; assuming active)
Network:          unknown (single sample; assuming active)
Disk I/O:         unknown (single sample; assuming active)

while spored's own log had a measurement every minute:

21:42:33 Not idle: Network traffic 157688 bytes
21:43:33 Not idle: Network traffic 105648 bytes
21:44:33 Not idle: Disk I/O 2883584 bytes
...

Cause: spored status is a separate one-shot process. Since #952 only the daemon's monitor loop samples, and buildStatusReport (cmd/spored/main.go) evaluates its own fresh Agent, so it always has exactly one sample. Its comment says so: "a one-shot has one sample, so the counter readings are 'unknown (single sample)'". It is therefore not an edge case: it is every status screen, on every instance, at every age. The signals that decide idle-stop are never visible to the user, and the line that explains why an instance is not stopping (Not idle: Network traffic 157688 bytes) is only in /var/log/spored.log.

Fix direction: have spored status read the daemon's last evaluation (the snapshot #952 introduced for the metrics endpoint and webhooks) over the existing local push API (127.0.0.1:7777) or a state file, and fall back to the one-shot reading, labelled as such, only when the daemon is not running. Show the daemon's last Not idle: reason and how long the instance has been continuously idle.

Activity

  1. added 4 commits that reference this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions