First enter the nginx directory
ps aux|grep nginx #View nginx process
Order | effect |
---|---|
TERM , INT | QUICK shutdown |
QUIT | Graceful shutdown gracefully shuts down the process, that is, waits for the request to end before shutting down |
HUP | Configuration reload, Start the new worker processes with a new configuration Gracefully shutdown the old worker processes Change the configuration file and reread the configuration file smoothly (use this without restarting after modifying the configuration file) |
USR1 | Reopen the log files to reread the log, useful when the log is split by month/day |
USR2 | Upgrade Executable on the fly |
WINCH | Gracefully shutdown the worker processes gracefully shut down old processes (with USR2 to upgrade) |
Specific syntax:
kill -signal option nginx main process number (master)
such as kill -HUP 3242 in
addition kill -signal optioncat logs/nginx.pid
# with backticks, in fact, he is the corresponding process number (I am in the nginx directory here, the relative path used)
such as kill -USR1cat logs/nginx.pid