繁体   English   中英

如何杀死由另一个进程自动启动的进程 ubuntu 20

[英]How to kill processes autostarted by another process in ubuntu 20

在最近apt get update on ubuntu (20.04.4 LTS) 之后,我的笔记本电脑的 %CPU 飙升,而坏人就是这个过程(来自top的输出):

 126978 5050      20   0   65460  59152   5824 R 100.0   0.4   0:03.45 gunicorn

我没有安装gunicorn

无论我如何杀死这个进程( kill -9 $PIDpkill -f gunicorn等),它都会回来,而且它似乎是由另一个进程自动启动的:

$ ps -faux | grep gunicorn
gosia     128413  0.0  0.0   9036   716 pts/0    S+   11:33   0:00  |   |   \_ grep --color=auto gunicorn
5050      125403  0.2  0.1  23380 20748 ?        Ss   11:26   0:01  \_ /venv/bin/python3 /venv/bin/gunicorn --timeout 86400 --bind [::]:9432 -w 1 --threads 25 --access-logfile - -c gunicorn_config.py run_pgadmin:app
5050      128411  0.0  0.1  37436 30912 ?        R    11:33   0:00      \_ /venv/bin/python3 /venv/bin/gunicorn --timeout 86400 --bind [::]:9432 -w 1 --threads 25 --access-logfile - -c gunicorn_config.py run_pgadmin:app

我目前没有使用任何虚拟环境:

$ which python3
/usr/bin/python3

我不知道从这一点到 go 的位置......我怎样才能有效地杀死它并防止自动启动?

非常感谢您的帮助!

我使用命令pstree -aH $PID获得了更多信息,它向我展示了这一点:

systemd splash
...
  ├─containerd-shim -namespace moby -id 56b1f6243bde3d21fcfcdc6ff77e6dce9d92acbc9583d7cc3a3f8420a33855ce -address /run/containerd/containerd.sock
  │   ├─gunicorn /venv/bin/gunicorn --timeout 86400 --bind [::]:9432 -w 1 --threads 25 --access-logfile - -c gunicorn_config.py run_pgadmin:app
  │   │   ├─gunicorn /venv/bin/gunicorn --timeout 86400 --bind [::]:9432 -w 1 --threads 25 --access-logfile - -c gunicorn_config.py run_pgadmin:app
  │   │   └─master -w
  │   │       ├─pickup -l -t unix -u
  │   │       └─qmgr -l -t unix -u

所以这些似乎是容器问题?

这很奇怪——我在一段时间(几个月)前玩过docker ,但是从我的系统中卸载了它并在之后删除了所有容器(或者这就是我的想法......)

但为了确保没有剩菜,我找到了这篇文章: https://fedingo.com/how-to-uninstall-docker-in-ubuntu/并按照步骤完全清除 docker。

这似乎奏效了,不再有 gunicorn 进程。 这可能是我用apt update提取的东西(仅推荐和信任的 ubuntu 软件更新)?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM