1

With Raspberry Pi and Python3 I get these subprocess:

ps -aux | grep python3

pi    4168  0.9  0.7  11088  7304 ?     S    18:31   0:00 python3 blue.py
pi    4175  1.2  0.7  11088  7300 ?     S    18:33   0:00 python3 blue.py
pi    4185  2.4  0.7  11092  7300 ?     S    18:35   0:00 python3 blue.py
pi    4195  6.5  0.7  11088  7300 ?     S    18:38   0:00 python3 green.py

I need kill all python3 blue.py (from Python) and get...

ps -aux | grep python3

pi    4195  6.5  0.7  11088  7300 ?     S    18:38   0:00 python3 green.py
Brad Solomon
  • 38,521
  • 31
  • 149
  • 235
canel
  • 81
  • 2
  • 7

1 Answers1

0

for centos7 i use

pkill -f "Process name"

enter image description here

sirmagid
  • 1,090
  • 1
  • 16
  • 23