💡 知识卡片
原始会话经 LLM 提炼后的结构化知识。比原始会话更好读、更好搜。
问答
monitor.py 多实例进程识别修复
问题:在 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)` 是元组而非布尔表达式,应写成 `'--employee' in out and 'alice' in out`。