Skip to content

feat(metrics): report GPU utilisation on macOS - #258

Merged
outofcoffee merged 3 commits into
mainfrom
macos-gpu-util
Oct 5, 2026
Merged

outofcoffee merged 3 commits into
mainfrom
macos-gpu-util

Conversation

@outofcoffee

Copy link
Copy Markdown
Collaborator

Reports GPU utilisation and name on macOS hosts, so a local node's metrics, dashboard and gauges show a GPU figure as NVIDIA hosts already do. Closes #217.

Summary

  • The collector reads the I/O Kit accelerator through ioreg and reports device utilisation and the GPU's model name; a host with no accelerator stays silent, and a failing ioreg is reported as a gpu: error.
  • macOS has no GPU memory total or temperature, so the bar and gauge formats draw no GPU mem series for a GPU that never reports a total, and the table format omits the mem= and temp= segments rather than printing zeros.
  • Docs updated; no wire-shape or API change.
  • Adds the macos-gpu-utilisation openspec change (deltas to engine-metrics and remote-metrics-bar-format), which still needs archiving.

Implementation details

ioreg was chosen over powermetrics (needs root) and IOKit via cgo (would break the pure-Go package and cross-compiling). The Intel/AMD spelling of the utilisation key is parsed too, but only the Apple Silicon output was checked on a real host.

spinloop-agent added 2 commits October 5, 2026 20:20
Read the I/O Kit accelerator through ioreg for utilisation and name. Memory
and temperature are absent on macOS, so the renderers omit them rather than
drawing zeros.
@outofcoffee outofcoffee added the enhancement New feature or request label Oct 5, 2026
@outofcoffee
outofcoffee marked this pull request as ready for review October 5, 2026 22:07
@outofcoffee
outofcoffee merged commit 6fff268 into main Oct 5, 2026
5 checks passed
@outofcoffee
outofcoffee deleted the macos-gpu-util branch October 5, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: show GPU utilisation on macOS

1 participant