From 7c60f028022010d054c758e3fec504d8bb335080 Mon Sep 17 00:00:00 2001 From: Aditya Raj Singh Date: Sun, 30 Aug 2026 20:39:39 +0530 Subject: [PATCH] fix(agent): don't read host CPU and memory totals from a Docker VM (#2272) refreshSystemDetails() takes NCPU and MemTotal from the Docker daemon's /info response. That only describes this machine when the daemon shares its kernel. On macOS and Windows Docker runs inside a Linux VM, so the system details header shows the VM's memory as the host total, and the VM's CPU count clamps both cores and threads through the lxc branch below it. Only consult Docker's host info on platforms where the daemon runs natively. Everything else already falls back to gopsutil, which reads this host. --- agent/system.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/system.go b/agent/system.go index f4441390..1df167ee 100644 --- a/agent/system.go +++ b/agent/system.go @@ -32,7 +32,11 @@ func (a *Agent) refreshSystemDetails() { if a.dockerManager != nil { a.systemDetails.Podman = a.dockerManager.IsPodman() - hostInfo, _ = a.dockerManager.GetHostInfo() + // Docker's host info describes the machine its daemon runs on. On macOS and + // Windows that is a Linux VM, so its CPU and memory totals are not this host's. + if runtime.GOOS != "darwin" && runtime.GOOS != "windows" { + hostInfo, _ = a.dockerManager.GetHostInfo() + } } a.systemDetails.Hostname, _ = os.Hostname()