nginx是通过给Nginx主进程发系统信号的方式来停止的
[root@h102 logs]# ps faux | grep nginx
root 11909 0.0 0.0 103256 828 pts/0 S+ 15:31 0:00 \_ grep nginx
root 11756 0.0 0.0 24316 676 ? Ss 15:23 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 11757 0.0 0.0 24728 1244 ? S 15:23 0:00 \_ nginx: worker process
[root@h102 logs]# kill -QUIT 11756
[root@h102 logs]# ps faux | grep nginx
root 11914 0.0 0.0 103256 824 pts/0 S+ 15:32 0:00 \_ grep nginx
[root@h102 logs]#
[root@h102 logs]# ps faux | grep nginx
root 11947 0.0 0.0 103256 828 pts/0 S+ 15:42 0:00 \_ grep nginx
root 11923 0.0 0.0 24316 676 ? Ss 15:34 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 11924 0.0 0.0 24728 1512 ? S 15:34 0:00 \_ nginx: worker process
[root@h102 logs]# kill -TERM 11923
[root@h102 logs]# ps faux | grep nginx
root 11950 0.0 0.0 103256 824 pts/0 S+ 15:42 0:00 \_ grep nginx
[root@h102 logs]#
[root@h102 logs]# ps faux | grep nginx
root 11961 0.0 0.0 103256 828 pts/0 S+ 15:43 0:00 \_ grep nginx
root 11957 0.0 0.0 24316 680 ? Ss 15:43 0:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 11958 0.0 0.0 24728 1516 ? S 15:43 0:00 \_ nginx: worker process
[root@h102 logs]# kill -INT 11957
[root@h102 logs]# ps faux | grep nginx
root 11964 0.0 0.0 103256 828 pts/0 S+ 15:43 0:00 \_ grep nginx
[root@h102 logs]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。