nginx基础18

2022-05-12 23:11:22 浏览数 (1)

此时两个master并存

从容关闭旧版本Nginx worker进程

代码语言:javascript复制
[root@h102 sbin]# ps fuax | grep nginx 
root      5730  0.0  0.0 103256   828 pts/0    S    20:43   0:00          _ grep nginx
root      5500  0.0  0.0  24316   848 ?        Ss   20:01   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5501  0.0  0.0  24728  1244 ?        S    20:01   0:00  _ nginx: worker process        
root      5651  0.0  0.0  24316  1820 ?        S    20:23   0:00  _ nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5653  0.0  0.0  24740  1532 ?        S    20:23   0:00      _ nginx: worker process 
[root@h102 sbin]# cat /usr/local/nginx/logs/nginx.pid.oldbin 
5500
[root@h102 sbin]# kill -WINCH `cat /usr/local/nginx/logs/nginx.pid.oldbin`
[root@h102 sbin]# ps fuax | grep nginx 
root      5738  0.0  0.0 103256   828 pts/0    S    20:45   0:00          _ grep nginx
root      5500  0.0  0.0  24316   852 ?        Ss   20:01   0:00 nginx: master process sbin/nginx -c conf/nginx.conf
root      5651  0.0  0.0  24316  1820 ?        S    20:23   0:00  _ nginx: master process sbin/nginx -c conf/nginx.conf
nobody    5653  0.0  0.0  24740  1532 ?        S    20:23   0:00      _ nginx: worker process        
[root@h102 sbin]# 

0 人点赞