Linux进程操作记录

关于Gunicorn如何终止进程:

 

1.用进程树显示主进程PID:

pstree -ap | grep gunicorn

 

2.如果有daemon进程无法用kill -9删除(可能是因为daemon屏蔽了kill -9导致)

kill -9 gunicorn主进程PID

即可删除gunicorn部署的进程。

 

补:重启gunicorn服务:

kill -HUP gunicorn主进程PID

# 执行上述命令后,再次执行“pstree -ap|grep gunicorn”,我们很容易发现,除了主进程,其他的Gunicorn进程都已经销毁,并新建了进程(进程ID发生了变化)。

 

 

3-1.若发现提示端口号被占用,或者无法连接xx链接:

netstat -tulpn

# 查询端口使用情况,可适当的用kill -9 删除占用端口

 

3-2.查看某某端口占用情况:

sudo netstat -nltp | grep 端口号

# 可根据情况删除占用端口或重启服务

 

4.清除所有uwsgi服务,杀死所有uwsgi进程:

ps -ef |grep uwsgi |awk '{print $2}'|xargs kill -9

 

5.启动uwsgi服务:

uwsgi --ini uwsgi配置文件.ini &

 

6.查询uwsgi进程:

ps aux|grep uwsgi

 

转载于:https://www.cnblogs.com/aidenzdly/p/10973631.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
保存和执行常用的linux命令,经常需要编辑的目录很深的文件,或教长的编译命令等等。使用方法:把该Q可执行文件考备份到linux上任何目录,第一次执行会被加到系统目录,以后每次执行都可以像使用系统命令一样。 1.查看保存好的命令 [root@localhost ~]# q 1_____clear 2_____tar -xzvf 3_____tar -czvf 4_____rpm -ivh 5_____lsnrctl status 6_____lsnrctl start 7_____lsnrctl stop 8_____vi /home/oracle/ora/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora 9_____/opt/lampp/lampp start 10_____/opt/lampp/lampp restart 11_____/opt/lampp/lampp stop 2.执行保存好的命令 [root@localhost ~]# q 10 Stopping XAMPP for Linux 1.8.1... XAMPP: Stopping Apache with SSL... XAMPP: Stopping MySQL... XAMPP: XAMPP-ProFTPD is not running. XAMPP stopped. 3.添加新命令 [root@localhost ~]# q -a "sqlplus /sys as dba" 1_____clear 2_____tar -xzvf 3_____tar -czvf 4_____rpm -ivh 5_____lsnrctl status 6_____lsnrctl start 7_____lsnrctl stop 8_____vi /home/oracle/ora/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora 9_____/opt/lampp/lampp start 10_____/opt/lampp/lampp restart 11_____/opt/lampp/lampp stop 12_____sqlplus /sys as dba 4.删除保存过的命令 [root@localhost ~]# q -d 12 1_____clear 2_____tar -xzvf 3_____tar -czvf 4_____rpm -ivh 5_____lsnrctl status 6_____lsnrctl start 7_____lsnrctl stop 8_____vi /home/oracle/ora/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora 9_____/opt/lampp/lampp start 10_____/opt/lampp/lampp restart 11_____/opt/lampp/lampp stop
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值