查找目前存在的正在运行的java程序,并强制kill
ps -ef | grep gunicorn
kill -9 int
连起来写个shell,可以用作重启
#!/bin/bash
ps -ef|grep "gunicorn" |grep -v grep|cut -c 9-15|xargs kill -9
cd /www/wwwroot/working_directory
nohup nohup gunicorn --bind 127.0.0.1:8081 app_name.wsgi:application&
使用它:
sh restart.sh
实时查看日志:
tail -f logs.log