View your tasks

1. Locate the task starts

ps aux | grep python xx.py
It will be fuzzy matching to find the related tasks

The first column: USER, second column: process ID PID, the third column: occupied by the CPU, the fourth column: occupied memory

2. Locate and then kill

ps aux | grep xx.py | awk -F" " '{print $2}' | xargs kill -9




Published 120 original articles · won praise 35 · views 170 000 +

Guess you like

Origin blog.csdn.net/u012328476/article/details/79044331