DSH Right Sidebar Performance Monitoring: @xmwengxing/dsh-client-ui-sidebar-perfmon

Introduction

When running agents or remote sessions in DeepSeek Harness (DSH), checking whether the host CPU or memory is saturated, or whether a process is misbehaving, usually means opening a separate system monitor or typing top over SSH. With many windows open, the context-switching cost gets high. The plugin introduced below brings host performance monitoring into the DSH right sidebar: view resource usage, temperatures, and the process list within the same GUI, and optionally prevent the remote host from entering sleep when idle.

What Is This

@xmwengxing/dsh-client-ui-sidebar-perfmon is published by community maintainer xmwengxing and categorized as a client-side plugin. It provides a real-time performance panel page in the DSH right sidebar and adds an entry button in the Session title bar; data comes from the host machine running DSH (Linux, macOS, or Windows), with no extra runtime dependencies — the host side uses node:os and platform-native tools, while the browser side reuses the GUI’s existing React.

Core Features

Resource Usage

A single page in the right sidebar centralizes:

  • CPU, memory, swap: ring gauges, with auxiliary lines showing core count and load, used/total, and swap status.
  • GPU: a single progress bar whose left and right halves show core frequency and dedicated VRAM usage, respectively.
  • Current session project directory size: scanned on demand; the card title area also shows the hostname and uptime.
  • Temperature: four tiles for CPU, GPU, motherboard, and disk, color-scaled as cool/warm/hot (70 °C, 85 °C as boundaries); when multiple sensors are present, the hottest reading is shown, with the tooltip listing covered sensors. See the Platform support table in the README for sensor types available on each platform.
  • Process table: each row includes CPU percentage, resident memory, share of RAM, PID, and thread count (shown as — where a field is unavailable on a given platform). Sortable by CPU, memory, or name; filterable by name or PID; column widths are draggable (widths remembered per browser); numeric columns are preserved first, so when the sidebar narrows the name column is compressed first.

Metrics that cannot be read are not filled with 0, but shown as —, with the reason in the tooltip or next to the timestamp in the page footer.

CPU Temperature on Windows

On Windows, if LibreHardwareMonitor is missing, Install LHM appears in the title bar (prefers pinning the package via winget); if installed but not running, Start LHM appears (requires a one-time privilege-elevated launch); once running, the button disappears and temperature data starts updating. The tooltip explains that UAC must be confirmed on the host desktop; when winget is unavailable, an official download link is provided.

Refresh and Keep-Awake

Default refresh intervals: Linux 2 s, macOS 3 s, Windows 4 s; the same interval drives all open panels, and polling pauses when the browser tab is hidden. The temperature card separately uses a slower shared cycle (reading temperature is costlier on Windows).

The footer Keep Awake toggle runs on the host: Windows uses SetThreadExecutionState, macOS uses caffeinate, Linux uses systemd-inhibit --what=sleep:idle (no shutdown involved). When off it consumes no resources; when on it maintains a helper process and keeps a ring buffer of the last 10 events in memory, without writing files. If a platform lacks the corresponding tool, the button is disabled with an explanation.

Environment and Requirements

  • Operating systems: Linux, macOS, or Windows (FreeBSD etc. degrade to limited readings from node:os only, with swap and the process table marked unavailable).
  • DeepSeek Harness 0.2.0-rc.1 or compatible, using a profile that launches @deepseek-ai/dsh-web-app (e.g., the web profile).
  • Node engine (package.json): ^22.19.0 || >=24.0.0.
  • License: MIT (package.json).

Installation and Enablement

Run in the terminal (pick one; commands from the official README):

# From npm
dsh plugin --profile web add @xmwengxing/dsh-client-ui-sidebar-perfmon

# From a local directory
dsh plugin --profile web add /path/to/dsh-client-ui-sidebar-perfmon

# From git (allow pnpm to run builds first)
dsh plugin --profile web add github:xmwengxing/dsh-client-ui-sidebar-perfmon

After installation, restart the GUI. To uninstall:

dsh plugin --profile web remove @xmwengxing/dsh-client-ui-sidebar-perfmon

Typical Usage

  1. After installation and GUI restart, find the Performance Monitoring card on the right sidebar landing page and click it to open the panel as a tab.
  2. Afterwards, use the icon button in the Session title bar to open or focus that tab (no text label; tooltip / accessible name: 「打开性能监控面板」/ “Open the performance monitor”).
  3. Sort and filter in the process table to observe processes with high CPU or memory usage; for long-running remote operations, turn on footer Keep Awake as appropriate.
  4. On Windows, if CPU temperature is needed, follow the title bar pill prompt to install or start LibreHardwareMonitor.

To speed up or slow down sampling, limit process rows, hide the GPU/temperature/keep-awake buttons, or pin the project directory scan path, you can override the defaults in a profile patch. The default design leans toward “resource-frugal”: e.g., about one /proc traversal every 2 seconds on Linux, shared across multiple windows.

# ~/.dsh/profiles/web/cordis.patch.yml
- id: perfmon
  name: '@xmwengxing/dsh-client-ui-sidebar-perfmon'
  config:
    refreshIntervalMs: 1000        # 500–60000; default Linux 2000 / macOS 3000 / Windows 4000
    processLimit: 100              # 5–500
    cacheMillis: 800               # 0–10000
    sampleMillis: 150              # 0–2000
    projectDirEntryBudget: 50000   # 100–1000000
    projectDirMaxDirs: 12          # 1–100
    temperatureIntervalMs: 15000   # 2000–600000
    gpuIntervalMs: 4000            # 500–60000; default follows refreshIntervalMs
    # gpu: false
    # temperature: false
    # keepAwake: false
    # projectDir: /srv/demo
    # projectDir: ''               # hide the directory size line

The README also documents two reading conventions: process CPU is scaled as “100% = one core” (consistent with top; multithreaded processes can exceed 100%); memory “used” counts as “unavailable”, with reclaimable page cache counted as available.

Use Cases and Notes

Who it’s for: people who frequently develop or operate in the DSH web GUI and want to see host load and processes without leaving the session; in remote-desktop or SSH-tunnel scenarios, the keep-awake toggle can reduce disconnections caused by the host going to sleep.

Permissions and security: the plugin reads /proc, invokes PowerShell, powermetrics, etc. on the host with the identity and privileges of the current DSH process. Before installing, it is recommended to read the GitHub repository source and MIT license; on Windows, starting LHM, and some temperature paths on Linux/macOS, may require elevated privileges or extra tools — follow the panel prompts.

Ecosystem note: DSH adopts an “everything is a plugin” extension approach; the SkillHub catalog page is a community plugin index with no official affiliation with DeepSeek / High-Flyer.

Conclusion

@xmwengxing/dsh-client-ui-sidebar-perfmon (current npm package version 0.6.0) puts CPU / memory / swap gauges, a GPU row, multiple temperature tiles, and a sortable process table into the DSH right sidebar, with optional remote sleep prevention. If you are already using the web profile, follow the commands above to install and restart the GUI, then access the panel from the landing page or the Session title bar.

  • Catalog page: https://www.skillhub.cn/plugins/xmwengxing/dsh-client-ui-sidebar-perfmon
  • GitHub: https://github.com/xmwengxing/dsh-client-ui-sidebar-perfmon
羽毛球分组比赛记分
小程序二维码

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

Xiaoye