flux module load [--name] module [args...]
flux module reload [--name] [--force] module [args...]
flux module remove [--force] name
flux module list [-l]
flux module stats [-R] [--clear] name
flux module debug [--setbit=VAL] [--clearbit=VAL] [--set=MASK] [--clear=MASK] name


flux module manages dynamically loadable flux-broker(1) modules.



Load module, which may be either the path to a shared object file, including the .so suffix, or the basename of a shared object file on the FLUX_MODULE_PATH, without the suffix.

When flux module load completes successfully, the new module has entered the running state (see LIST OUTPUT below).

-n, --name=NAME

Override the default module name. A single shared object file may be loaded multiple times under different names.


Reload module name. This is equivalent to running flux module remove followed by flux module load.

-f, --force

Suppress failure if module is not loaded and proceed with loading.

-n, --name=NAME

Override the default module name.


Remove module name.

-f, --force

Suppress failure if module name is not loaded.


List the loaded modules.

-l, --long

Include the full DSO path for each module.


Request statistics from module name. A JSON object containing a set of counters for each type of Flux message is returned by default, however the object may be customized on a module basis.

-p, --parse=OBJNAME

OBJNAME is a period delimited list of field names that should be walked to obtain a specific value or object in the returned JSON.

-t, --type=int|double

Force the returned value to be converted to int or double.

-s, --scale=N

Multiply the returned (int or double) value by the specified floating point value.

-R, --rusage

Return a JSON object representing an rusage structure returned by getrusage(2).

-c, --clear

Send a request message to clear statistics in the target module.

-C, --clear-all

Broadcast an event message to clear statistics in the target module on all ranks.


Manipulate debug flags in module name. The interpretation of debug flag bits is private to the module and its test drivers.

-C, --clear

Set all debug flags to 0.

-S, --set=MASK

Set debug flags to MASK.

-s, --setbit=VAL

Set one debug flag VAL to 1.

-c, --clearbit=VAL

Set one debug flag VAL to 0.


-c, --clear

Set debug flags to zero.

-S, --set=MASK

Set debug flags to MASK. The value may be prefixed with 0x to indicate hexadecimal or 0 to indicate octal, otherwise the value is interpreted as decimal.

-c, --clearbit=MASK

Clear the debug bits specified in MASK without disturbing other bits. The value is interpreted as above.

-s, --setbit=MASK

Set the debug bits specified in MASK without disturbing other bits. The value is interpreted as above.


The list command displays one line for each unique (as determined by SHA1 hash) loaded module.


The value of the mod_name symbol for this module.


Idle times are defined as the number of seconds since the module last sent a request or response message.


The state of the module is shown as a single character: I initializing, R running, F finalizing, E exited. A module automatically enters running state when it calls flux_reactor_run(3). It can transition earlier by calling flux_module_set_running().


If the module has registered additional services, the service names are displayed in a comma-separated list.


The full path to the broker module shared object file (only shown with the -l, --long option).


All Flux modules define the following global symbols:

const char *mod_name;

A null-terminated string defining the module name.

int mod_main (void *context, int argc, char **argv);

An entry function.


Flux: http://flux-framework.org

Flux RFC: https://flux-framework.readthedocs.io/projects/flux-rfc


5/Flux Broker Modules