$linuxjunkies
>

flux(1)

Flux is a container-native resource manager and job scheduler for HPC clusters and Kubernetes environments.

UbuntuDebianFedoraArch

Synopsis

flux [OPTION]... COMMAND [ARG]...

Description

Flux is a next-generation resource manager designed to manage large-scale computing clusters with improved scalability, flexibility, and ease of use compared to traditional HPC schedulers. It can run on bare-metal HPC systems, within Kubernetes clusters, or in hybrid environments.

The flux command provides a command-line interface to interact with a running Flux instance, allowing users to submit jobs, query status, manage resources, and monitor cluster state. Flux uses a hierarchical architecture where each node can run a Flux broker that communicates with other brokers to coordinate job scheduling and resource allocation.

Common options

FlagWhat it does
-h, --helpdisplay help message and exit
-v, --verboseincrease verbosity level (can be repeated)
-q, --quietsuppress non-error output
--versiondisplay Flux version and exit
-H, --host=HOSTNAMEconnect to Flux broker on specified host
-x, --exit-on-errorexit immediately if a subcommand fails

Examples

submit a job requesting 4 tasks with 30-minute time limit

flux submit -n 4 -t 30m ./my_job.sh

list all jobs in the current user's session with their status

flux jobs

cancel all running jobs for the current user

flux cancel $(flux jobs -a -n1 -S running -o {id})

display available compute resources and their current allocation status

flux resource list

show detailed information about a specific job

flux job info JOBID

allocate 8 nodes for 1 hour and start an interactive shell

flux alloc -n 8 -t 1h bash

run hostname command on all allocated resources

flux exec hostname

display real-time resource usage and job activity

flux top

Related commands