查看python脚本的运行pid,让python脚本后台运行

时间:2021-11-15 08:55:53

ps -ef | grep Productor.py | grep -v grep

# 先测试好

python3  /usr/local/software/ELK/Productor.py

# 没问题了放入后台执行

nohup python3 -u /usr/local/software/ELK/Productor.py > /usr/local/software/ELK/Productor.nohup.out 2>&1 &

# 先测试好

python3 -u /usr/local/software/ELK/Consumer.py

# 没问题了放入后台执行

nohup python3 -u /usr/local/software/ELK/Consumer.py > /usr/local/software/ELK/Consumer.nohup.out 2>&1 &