Skip to content

feat(system_monitor): Add GPU monitoring support for Windows and Linux (NVIDIA) #48

@moksha-hub

Description

@moksha-hub

Add GPU monitoring support for Windows and Linux systems with NVIDIA GPUs using NVML (NVIDIA Management Library).

Motivation

Currently, GPU monitoring is only available on macOS via IOKit. Windows and Linux users with NVIDIA GPUs cannot see:

  • GPU utilization percentage
  • VRAM usage

This is essential for ML/AI workloads and GPU-accelerated applications.

Proposed Solution

Integrate nvml-wrapper crate for NVIDIA GPU monitoring on Windows and Linux.

Features

  • GPU utilization monitoring (0–100%)
  • VRAM usage monitoring (used/total)
  • Multi-GPU detection
  • Graceful fallback for non-NVIDIA systems

Implementation Details

  • Add nvml-wrapper dependency (conditional for Windows/Linux)
  • Create NvidiaGpuStats struct for GPU statistics
  • Implement query_nvidia_gpu_stats() function
  • Store NVML instance in static OnceLock
  • Integrate with existing system monitor loop

Platform Support

Platform GPU Support
macOS IOKit (Apple Silicon, AMD, Intel)
Windows NVML (NVIDIA)
Linux NVML (NVIDIA)

Related

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