Skip to content

feature: Send the CPU count and the Docker state in the status #44

Closed

Description

@nabil1440

Blocker: no. This can wait until the agent stack is merged. It goes on top of the disk activity in the same stack.

Part of contract v0.5.0, section "2026-09-24 — Sites and Docker": "status: the CPU count and Docker".

Defect

  • The status of the agent has no CPU count and no Docker state.
  • Thus the control plane reads these values over SSH on each view of the Status page.

Cost

  • The Status page waits for an SSH command.
  • The control plane cannot stop its SSH reads while the agent does not send the values.

Benefit of the fix

  • The agent sends the CPU count, the Docker state and the Docker version with its status.
  • The control plane can show the CPU load as a percent, and the Docker line, from its database.

Fix

  1. Add the optional status field cpu_count: the number of cpuN lines in /proc/stat.
  2. Send GET /version to /var/run/docker.sock, with a limit of 5 seconds. Use only the Go standard library. Do not use the docker command.
  3. Set docker_status:
    • running when the request answers
    • not_running when there is no socket, or the connection is refused, and /usr/bin/dockerd exists
    • not_installed in the same case without /usr/bin/dockerd
    • null for each other result, for example "permission denied" or no answer in 5 seconds
  4. Set docker_version from the answer, only when docker_status is running.

Caution

  • Send only GET /version and GET /containers/json to the socket. Access to the socket is root access.

Completion checks

  • cpu_count equals nproc.
  • Each rule of docker_status has a test.
  • A socket that does not answer gives null after 5 seconds, and the report still goes.
  • The agent sends no other request to the socket.

Activity

  1. self-assigned this
    on Sep 24, 2026
  2. added a commit that references this issue on Sep 28, 2026
    edb9881
  3. changed the title [-]Send the CPU count and the Docker state in the status[/-] [+]feature: Send the CPU count and the Docker state in the status[/+] on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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