简体   繁体   English

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

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

after recent apt get update on ubuntu (20.04.4 LTS), my laptop's %CPU is skyrocketing and the villain is this process (output from top ):在最近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

i do not have gunicorn installed;我没有安装gunicorn

no matter how i kill this process ( kill -9 $PID , pkill -f gunicorn , etc.), it comes back, and it seems it is autostarted by another process:无论我如何杀死这个进程( 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

i'm not using any virtual environment at the moment:我目前没有使用任何虚拟环境:

$ which python3
/usr/bin/python3

i don't know where to go from this point... how can i effectively kill it and prevent from autostart?我不知道从这一点到 go 的位置......我怎样才能有效地杀死它并防止自动启动?

thanks so much for any help!非常感谢您的帮助!

I got some more info using the command pstree -aH $PID , which showed me this:我使用命令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

and so it seems these are container issues?所以这些似乎是容器问题?

This is weird - i played with docker some time (months) ago, but uninstalled it from my system and removed all containers just after (or that's what i thought...)这很奇怪——我在一段时间(几个月)前玩过docker ,但是从我的系统中卸载了它并在之后删除了所有容器(或者这就是我的想法......)

but to be sure there are no leftovers, i found this post: https://fedingo.com/how-to-uninstall-docker-in-ubuntu/ and followed the steps to completely purge docker.但为了确保没有剩菜,我找到了这篇文章: https://fedingo.com/how-to-uninstall-docker-in-ubuntu/并按照步骤完全清除 docker。

This seems to have worked, no more gunicorn processes.这似乎奏效了,不再有 gunicorn 进程。 Could this be something i pulled with apt update (only recommended and trusted ubuntu software updates)?这可能是我用apt update提取的东西(仅推荐和信任的 ubuntu 软件更新)?

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

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