https://github.com/chunhuitrue/aish
刚 vibe 出来,文档配置之类的还没加。
运行示例:
› 当前系统中有僵尸进程么?
• 我来检查系统中是否有僵尸进程。
• Ran ps aux '|' grep -w Z
└ ps: illegal argument: |
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-u]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
lll 61467 6.3 0.2 411403520 65552 s002 S+ 8:58 下午 0:00.45 aish
• Ran ps aux
└ USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
lll 429 32.8 3.0 413283760 1020816 ?? S 8 126
✔ You approved aish to run ps axo 'stat,pid,ppid,command' this time
• Ran ps axo 'stat,pid,ppid,command'
└ STAT PID PPID COMMAND
Ss 1 0 /sbin/launchd
Ss 83 1 /usr/libexec/logd
Ss 106 1 /usr/libexec/watchdogd
… +621 lines
Ss 750 552 -zsh
S+ 9711 750 emacsclient -nw
Ss+ 837 552 -zsh
Ss+ 882 552 -zsh
─ Took 41s
• 是的,当前系统中有 5 个僵尸进程:
| PID | PPID | 状态 | 父进程 |
|-------|------|------|--------|
| 54918 | 290 | Z | clash-core-service |
| 73753 | 290 | Z | clash-core-service |
| 75525 | 290 | Z | clash-core-service |
| 85212 | 290 | Z | clash-core-service |
| 97475 | 290 | Z | clash-core-service |
这些僵尸进程都是 clash-core-service (位于 /Users/lch/.config/clash/service/clash-core-service )产生的。
说明:僵尸进程是已经执行完成但父进程没有正确 wait() 它们的进程。它们不占用内存或 CPU ,只保留一个进程表项。
建议:通常不需要手动清理。重启 clash-core-service 服务可以让这些僵尸进程被 init 进程接管并自动清理。如果你想让这些僵尸进程消失,可以重启 clash 服务。
› 如果要手动清理,应该如何作?
• 僵尸进程无法直接 kill ,因为它们已经执行完成。清理方法是让父进程正确地 wait() 它们,或者让 init 进程( PID 1 )接管后自动清理。
针对你的情况,有两种方法:
方法 1:杀死父进程(推荐)
kill 290
这会终止 clash-core-service ,僵尸进程会被 init 接管并自动清理。如果 clash 是通过服务管理器启动的,它可能会自动重启。
方法 2:优雅重启 clash 服务
如果你知道如何重启 clash 服务(比如通过 launchctl 或 systemctl ),可以用相应命令重启服务,这样更安全。
———
注意事项:
- 方法 1 会中断 clash 服务,如果你的网络依赖它,可能会短暂断网
- 如果你使用 launchd 管理 clash ,可以用 launchctl 重启,更优雅
你是想直接杀死进程,还是需要我帮你查看如何正确重启 clash 服务?

