21hbguo/dsh-sysmon 预览 preview

21hbguo/dsh-sysmon

Plugin插件 Native原生 ⭐ 2 MIT Productivity & Tasks效率与任务

| 功能 | 说明 | |---|---| | 实时指标 | CPU / MEM / 磁盘 / GPU 使用率 + 进度条;网络 ↓下载 / ↑上传 速率分行显示,各带独立进度条(按近期峰值自动缩放) | | 进程网络 TOP10 | 悬停 ↓下载 / ↑上传 行,浮层显示进程网络 TOP10(有字节计数:近 3s 速率均值 + EMA 平滑;无字节计数:自动降级为按活跃连接数排序) | | 磁盘多挂载点 | 物理挂载点全部列出(根优先、按已用降序,最多 6 个),过滤 proc/sysfs/tmpfs 等虚拟文件系统 | | GPU 支持 | AMD 直接读 sysfs(零子进程);NVIDIA 走 nvidia-smi(后台异步采样,不阻塞事件循环) |

catalog descriptioncatalog 简介 / catalog description:DSH Web GUI 系统性能看板:小悬浮窗实时展示 CPU/内存/磁盘/网络/负载/GPU,host 零依赖采集,占用极小

Project Overview项目介绍

dsh-sysmon is a system performance widget plugin built specifically for the DeepSeek Harness (DSH) Web GUI. It installs as a cordis plugin inside the DSH host process, registering the sysmon settings namespace and a GET /api/sysmon/snapshot route via cordis apply. The browser half is written with native DOM plus fetch polling (no React), rendering a draggable bottom-right floater that surfaces live CPU, memory, disk, network, load, uptime, and GPU indicators. Installation comes in three forms: source build using the tsc and tsdown shipped inside a DSH source checkout, runtime hot-injection through dev_inject_plugin during development, or release-tgz bundle wiring that applies the in-repo cordis.patch.yml to insert the plugin row.

Typical workflow is leaving the floater pinned in the DSH web corner while running models or local services, so host resource pressure stays visible without opening a separate system monitor. Users can drag the title bar to reposition (persisted in localStorage), click to collapse to one line, hit × to hide and recall via a 「性能」 summon button, and hover the network rows to see a process-level TOP10 overlay. The settings card exposes only two knobs, enabled and cacheMs (100–60000 ms), while client polling is locked at 2 s and pauses automatically when the browser tab is hidden.

Dependencies are deliberately minimal: the host collector reads /proc, node:os, statfs, samples ss -tinp every 3 s for process network, and spawns nvidia-smi asynchronously every 5 s for NVIDIA GPUs with zero npm packages. React and the DSH client surface are marked external in tsdown.config.ts, and the build script auto-detects ~/dsh-harness, ~/dsh, or ~/.dsh/dsh-harness when DSH_CHECKOUT is unset. Capability degrades on non-Linux: total network rate, process-level TOP10, and process count become unavailable, while GPU appears only for AMD sysfs or NVIDIA with nvidia-smi. License is BSD-3-Clause. First-run checklist: refresh the Web GUI page, confirm the floater appears, and if the settings card is missing, add sysmon to WEB_SETTINGS_NAMESPACES in dsh-host-apiproxy and restart; do not expose DSH to the public internet because the snapshot endpoint is unauthenticated.

dsh-sysmon 是一个面向 DeepSeek Harness(DSH)Web GUI 的系统性能监控悬浮窗插件,作为 cordis 插件运行在 DSH 宿主进程内。它通过 cordis apply 注册 sysmon 设置命名空间与 GET /api/sysmon/snapshot 路由,在浏览器端以原生 DOM + fetch 轮询(无 React 框架)渲染右下角小窗,实时展示 CPU、内存、磁盘、网络、负载、运行时长与 GPU。安装支持三种方式:源码构建(依赖 DSH 检出里的 tsc/tsdown)、开发期 dev_inject_plugin 热注入、以及 Release tgz 作为 bundle 包装配并应用 cordis.patch.yml。

典型使用场景是在 DSH Web 界面右下角获得一个常驻悬浮窗,标题栏可拖动、折叠或隐藏,并悬停查看进程级网络 TOP10。它适合长时间跑模型或本地服务的开发者快速观察宿主机资源占用,无需额外打开系统监视器。设置页「系统性能看板」提供 enabled 总开关与 cacheMs(100–60000 毫秒)采集间隔两项可调参数,client 轮询固定 2 秒且仅在页面可见时运行。

依赖方面,host 端通过 /proc、node:os、statfs 与 ss -tinp、nvidia-smi 采集,零第三方依赖;client 端把 react 与 DSH 客户端表面标为 external,构建脚本默认探测 ~/dsh-harness 等路径或读取 DSH_CHECKOUT 环境变量。功能存在多项平台降级:网络总速率、进程网络 TOP10、进程数仅 Linux 可用;GPU 仅 AMD sysfs 与 NVIDIA 可显示;BSD-3-Clause 许可。首启需刷新页面确认悬浮窗出现,若设置卡未出现须为 dsh-host-apiproxy 的 WEB_SETTINGS_NAMESPACES 白名单补充 sysmon,且勿将 DSH 暴露公网。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:21hbguo/dsh-sysmon

把 21hbguo/dsh-sysmon 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-sysmon — DSH 系统性能看板(小悬浮窗)

为 DeepSeek Harness(DSH)Web GUI 提供右下角小悬浮窗,实时展示本机 CPU / 内存 / 磁盘 / 网络 / 负载 / 运行时长 / GPU。占用极小:host 采集零第三方依赖(/proc + node:os),client 零框架(原生 DOM,无 react),页面不可见时轮询自动暂停。

version license platform

系统性能悬浮窗:CPU / 内存 / 磁盘 / 网络 / 负载实时监控

✨ 功能特性

功能 说明
实时指标 CPU / MEM / 磁盘 / GPU 使用率 + 进度条;网络 ↓下载 / ↑上传 速率分行显示,各带独立进度条(按近期峰值自动缩放)
进程网络 TOP10 悬停 ↓下载 / ↑上传 行,浮层显示进程网络 TOP10(有字节计数:近 3s 速率均值 + EMA 平滑;无字节计数:自动降级为按活跃连接数排序)
磁盘多挂载点 物理挂载点全部列出(根优先、按已用降序,最多 6 个),过滤 proc/sysfs/tmpfs 等虚拟文件系统
GPU 支持 AMD 直接读 sysfs(零子进程);NVIDIA 走 nvidia-smi(后台异步采样,不阻塞事件循环)
拖动 / 折叠 / 隐藏 按住标题栏拖动,位置持久化(localStorage);点击标题折叠成单行;× 隐藏后右下角出现「性能」召唤按钮
省资源 client 轮询 2s(仅页面可见时,标签页隐藏即停);host 快照缓存 cacheMs,多次轮询不重复读 /proc

📐 架构

dsh-sysmon/
|-- src/
|   |-- index.ts        # host 半区:插件入口(cordis apply,注册设置命名空间 + 路由)
|   |-- metrics.ts      # SysmonCollector:/proc + node:os + statfs 采集(零依赖,带缓存)
|   |-- routes.ts       # GET /api/sysmon/snapshot JSON 路由
|   |-- types.ts        # 共享 wire 类型(host + client 共用,纯类型)
|   |-- invariant.ts    # 空 invariant 伴侣(无运行时断言)
|   `-- client/         # 浏览器半区
|       |-- index.ts    # 小悬浮窗(原生 DOM + fetch 轮询,无框架)
|       `-- PluginSettingsCard.tsx / settings-form.ts  # 设置卡片(settings.plugin.item 槽位)
|-- scripts/build.sh    # 用 DSH 检出的 tsc 编译 host + tsdown 打包 client
|-- cordis.patch.yml    # bundle patch:插入 sysmon 插件行
`-- tsdown.config.ts    # client 打包配置(react / dsh 客户端表面为外部依赖)
flowchart LR
    subgraph browser[浏览器 · DSH Web GUI]
        W[悬浮窗 client.js<br/>原生 DOM + fetch]
        C[设置卡片<br/>settings.plugin.item]
    end
    subgraph host[宿主进程]
        R[GET /api/sysmon/snapshot]
        S[SysmonCollector<br/>cacheMs 缓存]
        P[/proc + node:os + statfs]
        SS[后台采样<br/>ss -tinp 每 3s]
        NV[后台采样<br/>nvidia-smi 每 5s]
    end
    W -- 2s 轮询(仅可见时) --> R
    R --> S
    S --> P
    S --> SS
    S --> NV
    C -- 读写 settings 命名空间 sysmon --> S

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-high-fee-alert 下一个 Next dsh-nico-theme →