flux shutdown [OPTIONS] [TARGET]
The flux shutdown command causes the default Flux instance, or the instance specified by TARGET, to exit RUN state and begin the process of shutting down. TARGET may be either a native Flux URI or a high level URI, as described in flux-uri(1).
Only the rank 0 broker in RUN state may be targeted for shutdown. The current broker state may be viewed with flux-uptime(1).
If the instance is running an initial program, that program is terminated with SIGHUP. Note that the broker exit value normally reflects the exit code of the initial program, so if it is terminated by this signal, the broker exits with 128 + 1 = 129.
If the broker was launched by systemd, an exit code is used that informs systemd not to restart the broker.
Broker log messages that are posted during shutdown are displayed by
the shutdown command on stderr, until the broker completes executing its
rc3 script. By default, log messages with severity level <= LOG_INFO
A Flux system instance requires offline KVS garbage collection to remove
deleted KVS content and purged job directories, which accrue over time and
increase storage overhead and restart time. It is recommended that the
--gc option be used on a routine basis to optimize Flux.
flux shutdown accepts the following options:
- -h, --help
Display options and exit
Start the shutdown and exit immediately, without monitoring the process and displaying log messages.
Show only error log messages (severity level <= LOG_WARNING level).
Increase output verbosity. Level 1 shows all log messages. Higher verbosity levels are reserved for future use.
Dump a checkpoint of KVS content to PATH using flux-dump(1) after the KVS has been unloaded. The dump may be restored into a new Flux instance using flux-restore(1). Dump creation adds time to the shutdown sequence, proportional to the amount of data in the KVS.
--dump=autois a special case equivalent to
Prepare for offline KVS garbage collection by dumping a checkpoint of KVS content to
dump/<date>.tgzin statedir, if defined, otherwise in the broker's current working directory. Create a symbolic link named
dump/RESTOREpointing to the dump file. When this link is discovered on instance startup, the content database is truncated and recreated from the dump, and the link is removed. systemd-tmpfiles(8) automatically cleans up dump files in
/var/lib/flux/dumpafter 30 days.
- -y, --yes
Answer yes to any yes/no questions.
- -n, --no
Answer no to any yes/no questions.