Name
mosquitto_signal — a utility for sending signal events to Mosquitto brokers running on the local computer.
Synopsis
mosquitto_signal { -a | -p pid } signal
mosquitto_signal --help
Description
mosquitto_signal is a utility that can send named signals to one or all instances of a Mosquitto broker running on the local computer.
On POSIX like systems, it is a convenient replacement for the kill(1) command, with the added enhancement of being able to use named signals rather than generic system signals like SIGUSR1, and with the ability to signal multiple brokers at once.
On Windows, it is the only means of sending signals to a broker.
Options
-aSend the given signal to all processes matching the name mosquitto. As with all signal sending, only those processes you have permission to send the signal to will receive the signal.
-ppidSend the signal to a specific process id. mosquitto_signal will always attempt to send the corresponding signal to the given process and will not check whether it appears to be a mosquitto process.
Signals
The following named signals are available for use.
config-reload-
Trigger the broker to reload its configuration file, if in use.
On POSIX like systems this can also be triggered using the
SIGHUPsignal. Note thatSIGHUPis used by other named signals. log-rotate-
If the broker is using
log_dest file, then this will trigger the broker to close and reopen the log file.On POSIX like systems this can also be triggered using the
SIGHUPsignal. Note thatSIGHUPis used by other named signals. shutdown-
Trigger the broker to quit.
On POSIX like systems this can also be triggered using the
SIGINTsignal. tree-print-
Trigger the broker to print a representation of the subscription and retain trees to stdout. This is intended for debugging purposes only.
On POSIX like systems this can also be triggered using the
SIGUSR2signal. Note thatSIGUSR2is used by other named signals. xtreport-
Trigger the broker to write some internal state information to
/tmp/xtmosquitto.kcg.<pid>.<iteration>on POSIX systems orxtmosquitto.kcg.<pid>.<iteration>on Windows systems. This is intended for debugging purposes only.This signal is only used by the broker when appropriate support is compiled in, which is not the case by default.
On POSIX like systems this can also be triggered using the
SIGRTMINsignal.
Bugs
mosquitto bug information can be found at https://github.com/eclipse-mosquitto/mosquitto/issues