for Robot Artificial Inteligence

Program Background running & check PID

|

background running : Nohup

nohup <program_type> <file_name> &

응용

nohup python3 auto_trade.py > output.log & # save as log file.

or

nohup python3 auto_trade.py &

check background running process

ps aux list

or

ps aux list | grep .py

Kill process

because of running in background, we need to kill a process in terminal

if we use above command, then we can get PID, using PID that we want to kill, we can do below method.

 kill -9 PID

Comments