简体   繁体   中英

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 ):

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

i do not have gunicorn installed;

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:

$ 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?

thanks so much for any help!

I got some more info using the command pstree -aH $PID , which showed me this:

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...)

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.

This seems to have worked, no more gunicorn processes. Could this be something i pulled with apt update (only recommended and trusted ubuntu software updates)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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