AKS1st/dsh-sysmon

Plugin插件 Native原生 ⭐ 2 BSD-3-Clause Memory & Knowledge记忆与知识库

DSH Web系统状态悬浮窗:实时显示CPU、内存和磁盘占用率 | 针对DSH Web的系统状态悬浮窗,展示实时CPU、内存及磁盘使用情况

Project Overview项目介绍

This is a native plugin built specifically for DeepSeek Harness (DSH) Web that adds a persistent floating system status monitor to DSH's interface. The monitor is pinned to the bottom-right corner of the page and refreshes every one second to show real-time CPU, memory, and disk utilization rates. To install the plugin directly from the GitHub repository, users can run the DSH CLI command dsh plugin --profile web add github:AKS1st/dsh-sysmon followed by dsh web to launch DSH Web. For local development or custom builds, users can clone the repository, install dependencies with npm install, build with npm run build, then add the plugin from the local directory.

The monitor is designed to not interfere with normal user interaction with DSH Web, as it is set to pointer-events: none so clicks and other interactions pass through it to the interface below. It uses a default style of 11px light gray monospace text, and automatically changes the text color to orange or red when usage exceeds pre-configured thresholds. For example, CPU usage over 90% of total core capacity turns orange, while over 98% turns red, matching the same pattern for memory and disk usage above 80% and 90% respectively. This makes it easy for users to spot abnormal system loads at a glance without having to open a separate system monitor.

The plugin has a two-part architecture: a backend host sampler that runs periodically and a frontend client that fetches and displays data. The backend uses DSH's ctx.interval to run the sampler once per second, collects system data from Linux-specific paths like /proc/stat and /proc/meminfo, and caches the result for the frontend to access. It currently has several known limitations, including only working on Linux systems, only reporting disk usage for the root file system, and showing a 0 value for CPU usage on the first sample. The project is released under the permissive BSD-3-Clause open source license.

这是一个原生适配 DSH Web 的系统监控插件,会在页面右下角固定显示一个悬浮窗,每1秒刷新一次,展示当前CPU、内存和磁盘的占用率。用户可以直接通过 DSH 命令行工具执行 dsh plugin --profile web add github:AKS1st/dsh-sysmon 完成在线安装,也可以将仓库克隆到本地后,构建完成再从本地目录添加安装。

该悬浮窗设置了 pointer-events: none 属性,因此不会遮挡界面上的任何操作,不影响用户正常使用 DSH Web。它默认采用浅灰色11px等宽小字,当占用率超过预设阈值后,文字会自动变为橙色或红色,方便用户快速识别系统状态异常。适合所有在使用 DSH Web 过程中需要持续关注系统负载波动的用户。

该插件目前仅支持 Linux 系统,因为宿主采集器需要从 /proc/stat、/proc/meminfo 等 Linux 专属路径读取系统信息,且磁盘占用仅统计根文件系统的使用率。它采用 BSD-3-Clause 开源许可证,前端部分采用纯 DOM 实现,没有额外运行时依赖,首次采样时 CPU 使用率会默认显示 0。

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:AKS1st/dsh-sysmon

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

READMEREADME

dsh-sysmon

DSH Web 的系统状态悬浮窗:固定在页面右下角,每 1 秒刷新显示 CPU、内存、磁盘占用率。

CPU 39%/16    MEM 46%    DISK 22%

显示规格

  • 位置:右下角固定悬浮,pointer-events: none,不遮挡界面操作。
  • 配色:默认浅灰色小字(等宽字体、11px)。
  • 刷新:1 秒一次。

阈值规则

指标 默认(浅灰) 橙色 红色
CPU(x%/y) < 90%×核心数 x ≥ 90%×核心数 x ≥ 98%×核心数
内存 ≤ 80% > 80% > 90%
磁盘 ≤ 80% > 80% > 90%
  • CPU:x% 为所有核心使用率之和(可超过 100%),y 为总核心数;阈值按总容量比例计算。
  • 内存 / 磁盘:超过 80% 橙色、超过 90% 红色。

安装

从 GitHub 仓库安装:

dsh plugin --profile web add github:AKS1st/dsh-sysmon
dsh web

或 clone 到本地后从本地目录安装:

git clone https://github.com/AKS1st/dsh-sysmon.git
cd dsh-sysmon
npm install
npm run build
dsh plugin --profile web add .
dsh web

工作方式

  • Host(src/index.ts):通过 ctx.interval 挂载每秒运行且随插件生命周期清理的后台采样器,经 ctx.shell 采样(/proc/stat、nproc、/proc/meminfo、df -P /),把最新快照写入内存缓存。路由 GET /dsh-sysmon/api 只返回缓存(亚毫秒、零子进程开销),并拒绝非 GET 方法与跨源浏览器请求。CPU 使用率为相邻两次采样之间的增量(窗口约 1 秒),首次采样显示 0。
  • Client(src/client/index.ts):创建 #dsh-sysmon 固定定位元素,每 1 秒 fetch 一次路由,带 in-flight 守卫避免请求重叠;重绘只更新三个数值节点(diff 式)。纯 DOM 实现、零运行时依赖。

已知限制

  • 仅 Linux——宿主采集器读取 /proc/stat、/proc/meminfo 与 df;其他平台需要不同的采集器。
  • 仅根文件系统——磁盘占用只报告 /,按挂载点选择暂缓。
  • 采样窗口近似——CPU 百分比是相邻两次采样(约 1 秒)间隔内忙时占比,窗口内瞬时突发被平均。
← 上一个 Prev dsh-paste-names 下一个 Next dsh-web →