dsh-gpu-monitor-nvml: Real-Time Multi-GPU Monitoring for DeepSeek Harness

Introduction

When using DeepSeek Harness (DSH) for agent development or runtime, if your system is equipped with multiple NVIDIA GPUs, relying solely on the command-line nvidia-smi tool or external monitoring utilities does not allow you to intuitively view resource usage in the Web UI. This can lead to unbalanced resource allocation or make it difficult to detect anomalies in time. The dsh-gpu-monitor-nvml plugin is designed to solve this problem by integrating a real-time multi-GPU monitoring panel directly into the DSH Web UI sidebar.

What Is This

This is a plugin maintained by janpauldahlke and designed specifically for the DeepSeek Harness Web UI. Its core value is to provide real-time multi-GPU monitoring within the Web interface, helping developers track GPU utilization, memory usage, and power consumption without leaving the browser.

Core Features

  • Real-Time Monitoring Panel: Adds a monitoring Tab to the right sidebar of the DSH Web UI, displaying the status of all GPUs.
  • High-Frequency Sampling: Polls data at 1 Hz (once per second) and does not perform local storage, ensuring real-time data.
  • Visual Charts: Each GPU card provides a 2-minute trend chart (Sparkline), showing utilization, memory usage, and power consumption.
  • Detailed Metrics: Includes GPU utilization, memory utilization, memory usage (used/total/free), power consumption, core frequency, memory frequency, and associated process information.
  • Interaction and Feedback: Each metric row includes a Tooltip explaining the data source and meaning; when a value exceeds 95%, the progress bar turns red (amber); if data collection fails, an error note is displayed.
  • Data Source Switching: Supports NVML-first on Linux with fallback to nvidia-smi; supports nvidia-smi-first on Windows with fallback to NVML.
  • API Endpoint: Provides the /api/dsh-gpu-monitor endpoint, exporting a JSON-format snapshot.

Installation and Enablement

The plugin is installed into the local dsh web configuration.

  1. Install via npm:
    dsh plugin --profile web add dsh-gpu-monitor-nvml
  1. Or install from GitHub:
    dsh plugin --profile web add github:janpauldahlke/dsh-gpu-monitor-nvml
  1. After installation, restart dsh web and perform a hard refresh in the browser. The GPU monitoring panel should then appear in the right sidebar.

Verify Configuration

After installation, use the following command to verify that the plugin is loaded correctly:

dsh --profile web --dump-config | grep -E 'gpu-monitor|dsh-gpu-monitor-nvml'

And verify the data response through the API:

curl -s http://127.0.0.1:3080/api/dsh-gpu-monitor | head

Applicable Scenarios and Notes

  • Hardware Requirements: Supports NVIDIA GPUs and their drivers only. AMD and Intel GPUs are not supported. macOS (modern models) only supports Stub status, with no actual monitoring functionality.
  • Platform Differences:
    • Linux: Prefers NVML; if NVML is unavailable, it falls back to nvidia-smi and marks the smi badge.
    • Windows: Currently prefers nvidia-smi; if a binding is detected, it uses NVML.
  • Data Semantics: The “used memory” value calculated by NVML is total - free and includes the driver-reserved portion. This value differs from the “used memory” reported by nvidia-smi, but its meaning can be understood via the Tooltip.
  • Transparency: The data is sampled at 1 Hz and has no storage strategy. Stale data is marked as Stale rather than being masked by smoothing.

Conclusion

This plugin injects GPU monitoring capabilities into the DSH ecosystem in a lightweight way. For developers who need to manage multi-GPU resources, it provides an intuitive and real-time management experience.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye