🧠 公司知识云

登录

搜索:dsh_watcher

📇 知识卡片 (5 张)

📇 同机测试 dsh_watcher 会重复归档 qa

👤 ehong001 · 来源会话 session-5f750bba-2… · 📅 2026-10-17 15:52
问题:在同一台 NAS 上为 ehong001 安装 dsh_watcher 做测试时,两个 watcher 读取相同的 DSH 会话文件,同一会话会被同时打上 alice 和 ehong001 标签,产生重复归档。
方案:本地仅用于验证链路可以接受重复;生产环境应让每个员工在自己的电脑上运行 dsh_watcher --employee <工号>,各自只归档本机会话,避免同一会话被多实例重复采集。
在同一台 NAS 上为 ehong001 安装 dsh_watcher 做测试时,两个 watcher 读取相同的 DSH 会话文件,同一会话会被同时打上 alice 和 ehong001 标签,产生重复归档。 本地仅用于验证链路可以接受重复;生产环境应让每个员工在自己的电脑上运行 dsh_watcher --employee <工号>,各自只归档本机会话,避免同一会话被多实例重复采集。 [] ["dsh_watcher", "会话归档", "部署规范"]
dsh_watcher 会话归档 部署规范

📇 monitor.py 多实例进程识别修复 qa

👤 ehong001 · 来源会话 session-5f750bba-2… · 📅 2026-10-17 15:52
问题:在 monitor.py 中新增 dsh_watcher 的第二个实例(--employee ehong001)后,原 is_running 判断只匹配 'dsh_watcher.py' 和 '--rag',无法区分 alice 与 ehong001 两个实例,导致状态检测错误。
方案:1) 在服务列表中新增 name 为 dsh_watcher_ehong001 的条目,cmd 中指定 --employee ehong001 及对应 nas-url/token/web-url/--daemon/--interval 30/--rag;2) 修改 is_running 的 match_args 分支,按 name 区分:dsh_watcher 类需同时匹配 'dsh_watcher.py' 与 '--rag',并进一步用 '--employee' 后的参数值区分实例;3) 注意 Python 中 `('--employee', 'alice' in out)` 是元组而非布尔
在 monitor.py 中新增 dsh_watcher 的第二个实例(--employee ehong001)后,原 is_running 判断只匹配 'dsh_watcher.py' 和 '--rag',无法区分 alice 与 ehong001 两个实例,导致状态检测错误。 1) 在服务列表中新增 name 为 dsh_watcher_ehong001…
Python 进程监控 monitor.py 多实例 语法陷阱

📇 清理残留 dsh_watcher 进程与任务计划 qa

👤 ehong001 · 来源会话 session-50f2cd71-3… · 📅 2026-10-17 21:28
问题:NAS 上存在多个残留的 dsh_watcher 进程和重复的 Windows 任务计划:alice 账号已不存在仍在监听,ehong001 的 watcher 指向 Tailscale 内网地址 100.121.80.122 但本机未装 Tailscale 导致推送失败。
方案:1) 杀掉所有 dsh_watcher 进程(按 PID 逐个 kill,如 9616、11292、3128);2) 删除旧任务计划(schtasks 删除 NAS-DSH-Watcher-admin、NAS-DSH-Watcher-ehong001 等重复项);3) 重新启动干净的 ehong001 watcher,--nas-url 指向 http://127.0.0.1:9000;4) 重新安装任务计划;5) 用 monitor.py 验证各服务 running/healthy 状态。
清 理 残 留 dsh_watcher 进 程 与 任 务 计 划 NAS 上 存 在 多 个 残 留 的 dsh_watcher 进 程 和 重 复 的 Windows 任…
Windows 任务计划 进程清理 dsh_watcher NAS

📇 DSH会话同步watcher无日志排查 qa

👤 admin · 来源会话 session-e1d06978-7… · 📅 2026-10-17 21:29
问题:dsh_watcher 进程在运行,但 dsh_watcher.admin.out.log / .err.log 均为 0 字节,没有推送日志,怀疑进程未正常启动或未执行推送。
方案:1) 确认日志路径为 D:\nas-data\logs\dsh_watcher.<employee>.log(logger 名为 dsh_watcher:<employee>);2) 检查启动参数:--employee、--nas-url、--token(或 .secrets.json 中的 sync_token,缺失会直接 sys.exit(1));3) 确认 --dsh-root 路径存在,否则只告警不推送;4) 用 --once 参数手动跑一次,观察 push_existing 是否输出“扫描现有会话”“pushed <sid>”“初始化推送完成”等日志,以区分是启动失败还是仅等待新事件
DSH 会 话 同 步 watcher 无 日 志 排 查 dsh_watcher 进 程 在 运 行 , 但 dsh_watcher.admin.out.log / .err.log 均 为 0 字 节 , 没…
dsh_watcher 日志排查 NAS同步 Python

📇 dsh_watcher推送机制与接口 qa

👤 admin · 来源会话 session-e1d06978-7… · 📅 2026-10-17 21:29
问题:需要理解 dsh_watcher 如何把 DSH 会话同步到 NAS,以及推送失败时如何定位。
方案:启动时先执行 push_existing:遍历 find_sessions(dsh_root) 找到每个 session 目录下的 session.v4.jsonl.zstd,读取字节后 POST 到 {nas_url}/sync/{employee}/{sid},请求头带 Authorization: Bearer <token>、Content-Type: application/octet-stream,超时 60s;返回 200 记为成功并打印大小,非 200 打印状态码与前 200 字符响应,异常打印 error。之后用 watchdog Observer 递归监听 dsh_root
dsh_watcher 推 送 机 制 与 接 口 需 要 理 解 dsh_watcher 如 何 把 DSH 会 话 同 步 到 NAS, 以 及 推 送 失 败 时…
dsh_watcher 会话同步 HTTP接口 watchdog

💬 会话 (12 个)

你好,

👤 admin · 💬 1395 条消息 · 📅 2026-10-18 14:39
…The file D:\nas-data\services\dsh_watcher.py has been updated successfully. The file D:\nas-data\services\dsh_watcher.py has been updated successfully. === 杀 所 有 dsh_watcher 进…

你好,

👤 admin · 💬 743 条消息 · 📅 2026-10-17 21:38
…删 旧 任 务 计 划 === TaskName: \NAS-AutoShutdown TaskName: \NAS-Daily-Backup TaskName: \NAS-DSH-Watcher-admin TaskName: \NAS-DSH-Watcher-admin TaskName: \NAS-DSH-Watcher-ehong001 TaskName: \NAS-DSH-Watcher…

你好,

👤 ehong001 · 💬 743 条消息 · 📅 2026-10-17 21:38
…删 旧 任 务 计 划 === TaskName: \NAS-AutoShutdown TaskName: \NAS-Daily-Backup TaskName: \NAS-DSH-Watcher-admin TaskName: \NAS-DSH-Watcher-admin TaskName: \NAS-DSH-Watcher-ehong001 TaskName: \NAS-DSH-Watcher…

你好,

👤 admin · 💬 696 条消息 · 📅 2026-10-17 16:39
…true }, { "name": "dsh_watcher", "running": true, "healthy": true }, { "name": "dsh_watcher_ehong001", "running": true, "healthy": true }, { "name": "frpc_chmlfrp", "running": true, "healthy": true } ] } 🎉 全 部 成 功 ! - ✅ dsh_watcher (alice) running - ✅ **dsh…

你好,

👤 ehong001 · 💬 696 条消息 · 📅 2026-10-17 16:39
…true }, { "name": "dsh_watcher", "running": true, "healthy": true }, { "name": "dsh_watcher_ehong001", "running": true, "healthy": true }, { "name": "frpc_chmlfrp", "running": true, "healthy": true } ] } 🎉 全 部 成 功 ! - ✅ dsh_watcher (alice) running - ✅ **dsh…

你好,

👤 ehong001 · 💬 1038 条消息 · 📅 2026-10-18 10:38
…The file D:\nas-data\services\dsh_watcher.py has been updated successfully. The file D:\nas-data\services\dsh_watcher.py has been updated successfully. === 杀 所 有 dsh_watcher 进…

你好,

👤 admin · 💬 589 条消息 · 📅 2026-10-17 16:01
…The file D:\nas-data\services\dsh_watcher.py has been updated successfully. The file D:\nas-data\services\dsh_watcher.py has been updated successfully. === 杀 所 有 dsh_watcher 进…

你好,

👤 ehong001 · 💬 589 条消息 · 📅 2026-10-17 16:01
…The file D:\nas-data\services\dsh_watcher.py has been updated successfully. The file D:\nas-data\services\dsh_watcher.py has been updated successfully. === 杀 所 有 dsh_watcher 进…

我这里主要就是谈开发出口退

👤 admin · 💬 89 条消息 · 📅 2026-10-18 09:54
…说 明 dsh_watcher 没 装 或 没 启 用 `--rag` 参 数 2. 管 理 员 联 系 IT 重 装 我 先 查 一 下 公…

我这里主要就是谈开发出口退

👤 ehong001 · 💬 89 条消息 · 📅 2026-10-18 09:54
…说 明 dsh_watcher 没 装 或 没 启 用 `--rag` 参 数 2. 管 理 员 联 系 IT 重 装 我 先 查 一 下 公…

我们的前端其实就是财税顾问

👤 admin · 💬 123 条消息 · 📅 2026-10-17 21:33
…说 明 dsh_watcher 没 装 或 没 启 用 `--rag` 参 数 2. 管 理 员 联 系 IT 重 装 加 载 完 了 , 找 到…

我们的前端其实就是财税顾问

👤 ehong001 · 💬 123 条消息 · 📅 2026-10-17 21:33
…说 明 dsh_watcher 没 装 或 没 启 用 `--rag` 参 数 2. 管 理 员 联 系 IT 重 装 加 载 完 了 , 找 到…