信号
Signals
On Unix systems, the NATS server responds to the following signals:
Signal
Result
SIGKILL
Kills the process immediately
SIGQUIT
Kills the process immediately and performs a core dump
SIGINT
Stops the server gracefully
SIGTERM
Stops the server gracefully
SIGUSR1
Reopens the log file for log rotation
SIGHUP
Reloads server configuration file
SIGUSR2
Stops the server after evicting all clients (lame duck mode)
The nats-server
binary can be used to send these signals to running NATS servers using the -sl
flag:
##Quit the server
Stop the server
Reopen log file for log rotation
Reload server configuration
Lame duck mode server configuration
If there are multiple nats-server
processes running, or if pgrep
isn't available, you must either specify a PID or the absolute path to a PID file:
See the Windows Service section for information on signaling the NATS server on Windows.
最后更新于