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