在 Debian 系统中,“进程卡死”通常指某个进程无响应(假死、占用资源过高、无法退出等)。根据不同场景,有以下几种重启/结束进程的方式:
ps aux | grep 进程名
top
htop
找到:
kill PID
或
kill -15 PID
如果没反应:
kill -9 PID
⚠️ -9 不会给进程清理机会,可能导致数据丢失
如果是服务(如 nginx、mysql):
systemctl status 服务名
systemctl restart 服务名
systemctl stop 服务名
systemctl start 服务名
systemctl kill 服务名
docker ps
docker restart 容器名或ID
强制:
docker kill 容器名或ID
如果 ps 显示状态为 D:
✅ 解决方式:
reboot
reboot
或
init 6
echo b > /proc/sysrq-trigger
systemd 管理进程MemoryMax)如果你能告诉我:
我可以给你更精确的命令。