View a summary of current jobs with squeue
Use the squeue command to view real-time status information about Slurm jobs and job steps. squeue provides an overview of jobs currently running or in queue. For more detailed real-time information about a particular job, use scontrol.
Run the squeue command by itself to display the status of every active job in the system:
squeue command. The following examples show common filters.
To display details about a specific job, use the -j flag:
squeue with the -t flag. Enter Slurm job state codes as a comma-separated list.
-u flag:
squeue may omit job steps to keep the output concise. To display job steps with squeue, use the -s flag:
Determine the reason a job is PENDING
Running a Slurm job is a request for resource allocation, not an instantaneous execution. Until the requested resources are available, the job remains in a PENDING state. This is expected behavior and is part of the Slurm job lifecycle.
The squeue command includes a REASON column that provides insight into why a job is in a given state.
In a healthy Slurm queue, these reasons are common:
Running
squeue sends a remote procedure call to slurmctld. To avoid overloading the Slurm Controller and impacting performance, limit squeue calls to the minimum necessary.View detailed information about a specific Slurm job with scontrol
The scontrol command provides a more detailed view about a particular job, compared to the summary offered by squeue. Like squeue, scontrol displays live, real-time data, and you can configure it to display job steps.
To view detailed information about a specific job, use scontrol show job with the relevant [JOB-ID]:
scontrol show step with the relevant [JOB-ID] and [STEP-ID]:
View information about completed Slurm jobs with sacct
To view information about completed jobs, including job steps and resource usage, use the sacct command. Unlike squeue and scontrol, sacct displays data about jobs that aren’t currently running or in queue. The output of sacct displays job steps by default.
For a comprehensive view of job steps for a given job, use the sacct command with the -j flag:
--showsteps flag to the preceding command to explicitly list individual steps in the output:
--format flag with sacct to format the output in a more readable manner:
Slurm job state codes
Use this reference to interpret the state codes that appear in the output of the preceding commands. Slurm job states are designated by codes, which appear in theSTATE or ST columns of the squeue or sacct command output.