1.安装
git clone https://github.com/dvarrazzo/py-setproctitle.git
cd py-setproctitle
python setup.py build
python setup.py install
pip install setproctitle
2.示例
import setproctitle
setproctitle.setproctitle("进程别名")
3.验证
ps -ef | grep python
#已经没有python的影子了
- `ps -ef | egrep '进程名'