Skip to content

[windows] host stats: CPU and load averages are never read; the UI shows them as measured zeros #139

Closed

Description

@azrael-229

On Windows, host.Reader.Read() (internal/host/host_windows.go) fills RAM and swap from GlobalMemoryStatusEx and reports the real core count, but CPU and the load averages have no reading and "stay 0" (per the comment in the file). The sample still marks the reader supported, so the harbor card's machine meter renders CPU 0% and LOAD 0 0 0 as live readings.

Repro (main @ 050866f, Windows 11, one RTX 5070 Ti decoding a 27B model): last /v1/history sample while the GPU is at 91% util:

"cpu_pct": 0,
"ram_used": 30759657472

The card shows CPU 0% and zero load next to the real RAM figure — it reads as a dead gauge rather than "not measured on this platform".

Two parts:

  1. cpu_pct is cheap to read on Windows: two GetSystemTimes reads between polls give idle vs total time. Load averages have no Windows equivalent; the UI should show n/a for those.
  2. The UI cannot distinguish "unsupported" from "zero". The card should render n/a for fields the platform does not read (the same page already has an n/a helper for this).

Activity

  1. T-Crypt commented on Oct 22, 2026

    @T-Crypt
    Owner

    Thanks for this one. Fixed in #144: Windows now reads CPU from GetSystemTimes. Load averages, which Windows doesn't have, are left out of the JSON, so the harbor and berth status show n/a instead of zeros. The Windows CI job checks the CPU reading on a real runner.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions