DeepSeek Harness Plugin

newpage1/ascend-npu-profiling-tuning-skill#dsh-ascend-perf

Category Development & Runtime Added 2026-11-10

Read-only Ascend NPU fleet monitor for DeepSeek Harness: environments are read from envs.json, npu-smi is collected locally or over SSH with one connection per environment, and the sidebar shows each environment's idle/partial/busy occupancy, running processes, per-card and per-chip details, five-minute background polling, manual refresh, and a field-by-field configuration modal. It never starts or stops services or containers and never writes to the remote host.

Install

# from a prebuilt release tarball

dsh plugin --profile web add "https://github.com/newpage1/ascend-npu-profiling-tuning-skill/releases/download/v1.0.0/dsh-ascend-perf-1.0.0.tgz"

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:newpage1/ascend-npu-profiling-tuning-skill#path:/dsh-ascend-perf

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

DeepSeek Harness(DSH)的只读昇腾 NPU 多环境占用看板。第一个发布版只包含「环境信息」视图:服务部署与性能调优仍在本地打磨,不在此版本界面中。

功能

  • 多环境:环境来自 envs.json,配置几个就显示几个;不再把主机地址写死在页面里。
  • 只读采集:本机或 SSH 执行 npu-smi,每环境一条 SSH 连接(一次取 info,再按卡号取 usages)。
  • 占用视图:每个环境显示空闲 / 部分占用 / 高负载;占用进程按名称聚合;逐卡显示 910B 的 1–8 或 910C 的 1–16 编号,展开可看每卡 chip 的温度、功耗、AICore、HBM、进程显存。
  • 静默采集:默认每 5 分钟采集一次,可在「环境配置」弹窗里改 1–60 分钟;另有「刷新全部」与单环境刷新。
  • 连接抖动:SSH 255 先重试一次;连续失败保留上次成功快照并标记「连接抖动 · 上次 HH:MM」,无历史才显示连接失败。
  • 零远端写入:不启停服务/容器,不跑 benchmark,不修改 NPU 状态,不写远端文件。

安装

dsh plugin --profile web add "github:newpage1/ascend-npu-profiling-tuning-skill#path:/dsh-ascend-perf"

装完刷新 Web 页面,右侧栏会出现「昇腾环境监控」tab(首次会尝试自动打开)。

卸载:

dsh plugin --profile web remove dsh-ascend-perf

配置

唯一真源是 ~/.config/ascend-perf/envs.json(0600)。首次启动时插件会:

  1. 优先迁移旧 ~/.local/share/dsh-ascend-perf/settings.json;
  2. 否则从 ~/.config/ascend-perf/npu-ssh.md / npu.env 播种已有登录目标;
  3. 都没有则生成一个空环境列表,页面提供「环境配置」弹窗逐字段添加。

字段:

{
  "version": 2,
  "pollIntervalMs": 300000,
  "envs": [
    {
      "id": "env-1",
      "name": "集群A",
      "mode": "ssh",
      "hostAlias": "root@10.0.0.5",
      "npuSmiPath": "npu-smi",
      "timeoutMs": 15000,
      "enabled": true
    }
  ]
}
  • mode: local 或 ssh;hostAlias 支持 ~/.ssh/config 的 Host 别名或 user@host。
  • 插件不保存密码/私钥,使用系统默认密钥与 ~/.ssh/config;不写 known_hosts。
  • 远端账号需能执行 npu-smi,且已接受过 host key。
  • UI 只显示 环境 N · IP(或自定义名 · IP),编辑态才显示完整 user@host。

只读命令

SSH 远端只执行固定白名单:

npu-smi info
npu-smi info -t usages -i <card-id>

卡号由 npu-smi info 输出中的数字列提取,命令参数经 quotePosix 转义;BatchMode=yes、StrictHostKeyChecking=yes、ConnectTimeout=8、ServerAliveInterval=5、ServerAliveCountMax=2。

环境要求

  • DSH Web 0.2.x,Node.js 20+;
  • 采集端有 npu-smi(CANN 工具链);
  • 昇腾 910B(8 卡/16 chip)或 910C(16 卡)优先;其他型号按实际卡数展示。

已知边界

  • 本版本不提供部署与调优界面;
  • 进程信息依赖 npu-smi info -t usages 的输出;驱动不返回进程时,以 HBM/AICore 阈值判断占用,并标注未知;
  • 页面不读取 envs.json 以外的凭据文件,也不会把 SSH 私钥写入插件目录。

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.