7

In reference to this question I had asked, I can successfully run jobs using multiprocessing and I can see that all processors are being utilized. How do I kill this job? From terminal I run:

python my_multiprocessor_script.py

Then I hit Ctrl+C to kill.

However the job doesn't seem to be killed and I can see all the processors still in use. I'm running Red Hat Enterprise Linux Server release 6.6.

Community
  • 1
  • 1
ADJ
  • 4,892
  • 10
  • 50
  • 83

1 Answers1

8

You should be able to do something like this.

Original Author

kill -9 `ps -ef | grep my_multiprocessor_script.py | grep -v grep | awk '{print $2}'`

also take a look at Python Multiprocessing Kill Processes for more info

Community
  • 1
  • 1
MZaragoza
  • 10,108
  • 9
  • 71
  • 116