A native macOS desktop widget that monitors GPU VRAM usage and system memory in real-time. Built with SwiftUI and WidgetKit for Apple Silicon Macs.
- Live VRAM monitoring — displays allocated memory, in-use memory and GPU utilization percentage
- Memory pressure indicators — color-coded pressure levels (Normal → Pressure → High → Critical)
- Usage history graph — rolling 60-sample bar chart showing VRAM usage over time
- System memory stats — physical, app, wired, compressed and cached memory breakdown
- Remote monitoring — monitor GPU stats from other Macs on your network via a built-in TCP server/client
- Desktop widgets — small, medium and large widget sizes via WidgetKit (updates every 30 seconds)
The app reads GPU statistics directly from IOKit (IOAccelerator service) and queries total GPU memory via Metal's recommendedMaxWorkingSetSize. System memory stats come from host_statistics64. Data is polled every 5 seconds in the main app and every 30 seconds for the desktop widget.
For remote monitoring the app runs a lightweight TCP server on port 9847. When a client connects it responds with a JSON payload containing the host's current GPU and system memory stats. The client/server protocol uses a simple 4-byte big-endian length header followed by the JSON body.
History is persisted to disk via an App Group container so both the main app and the widget extension share the same data.
GPUWidget/ Main app (SwiftUI window)
GPUWidgetExtension/ WidgetKit extension (small/medium/large)
Shared/ Shared code between app and extension
├── GPUDataProvider IOKit + Metal GPU stats fetcher
├── MemoryStats Data models (GPUMemorySnapshot, SystemMemoryStats)
├── NetworkMonitor TCP server/client for remote monitoring
├── GraphDataStore Persistent rolling history (App Group)
├── PressureColor Pressure level enum with colors
├── SharedViews Graph and pressure bar views
└── FormatUtils Number formatting helpers
- macOS 26.0+ (Tahoe)
- Apple Silicon (M-series)
- Xcode 26+
- Swift 6.0
# Clone
git clone https://github.com/alexkerber/GPU-widget.git
cd GPU-widget
# Generate Xcode project (requires XcodeGen)
brew install xcodegen
xcodegen generate
# Open and build
open GPUWidget.xcodeprojBuild and run the GPUWidget scheme. The app installs itself as a menu bar companion — right-click your desktop → Edit Widgets → search "GPU VRAM" → drag to desktop.
Grab the latest .dmg from Releases. Mount it and drag GPU Widget.app to Applications.
- On the machine you want to monitor: open GPU Widget → Settings → enable "Share GPU data on network"
- On your local machine: Settings → Remote Hosts → add the IP address of the remote Mac
- The widget will now show remote GPU stats alongside your local data
MIT — do whatever you want with it.
