3

I saw and tried many solutions.

I used ps aux | grep script.py to get the pid of the process. I got the following output: bioseq 24739 0.0 0.0 112884 1200 pts/1 R+ 13:20 0:00 grep --color=auto /script.py , and then typed: kill 112884 and got the output 112884: No such process.

I also tried a similar command with grep -i, which yielded a different pid. kill <pid> also yielded <pid> No such process.

it's me
  • 31
  • 1
  • 1
  • 4

2 Answers2

4

Try a pkill to kill the process, but you might also check your cron: it's possible that you kill the process but that the crontab restarts it constantly.

Dominique
  • 13,061
  • 14
  • 45
  • 83
  • I didn't run it with cron, just run the script from the terminal. – it's me Sep 02 '20 at 11:02
  • If you run it from the terminal, then you should be able to stop it using that terminal (you can also turn off the terminal). However, there is the possibility that the script subscribed itself to the cron, causing it to repeat itself. So it might be interesting to check crontab settings. – Dominique Sep 02 '20 at 11:13
1
  • First of all, check whether The listed process was probably a zombie process? therefore you cannot kill. Its live-time is depending on its parent process.
  • If you add the u flag to the call of ps, it displays also the STAT column which is Z for zombie processes.
  • if its a zombie process this has perfect explanation How to kill zombie process

if its not a zombie process try this, killall [process name] command. expects a process name, e.g. killall gedit which kills all such processes.

For more refer man killall

Jatin Mehrotra
  • 5,637
  • 1
  • 12
  • 41