"No such process" when trying to kill a running python script

Viewed 15508

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.

2 Answers

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.

  • 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

Related