[nginx]nginx 信号量

来源:互联网 发布:水滴筹靠谱吗 知乎 编辑:程序博客网 时间:2024/05/22 14:01

nginx 信号量

查找nginx 的相关进程
ps aux|grep nginx


Quick shutdown 

TERM, INT



 优雅的关闭进程,即等请求结束后再关闭

QUIT

Graceful shutdown 





改变配置文件,平滑的重读配置文件

HUP

Configuration reload ,Start the new worker processes with

 a new configuration Gracefully shutdown the old worker processes


重读日志,在日志按月/日分割时有用

USR1

Reopen the log files 


平滑的升级

USR2

Upgrade Executable on the fly 


 优雅关闭旧的进程(配合USR2来进行升级)

WINCH

Gracefully shutdown the worker processes




kill -INT 23354

kill -信号选项 nginx的主进程号

kill -HUP 4873

kill -信号控制 `cat /xxx/path/log/nginx.pid`

kill -USR1 `cat /xxx/path/log/nginx.pid`



获得nginx的进程id
cat logs/nginx.pid

常用的命令
more +文件
tail +文件



./sbin/nginx -s reload   =  kill -HUP nginx.pid

./sbin/nginx -s reopen  =  kill -USR1 nginx.pid


原创粉丝点击