Skip to content

SLURM Commands

SLURM uses command-line commands to control jobs and clusters as well as show detailed information about jobs. The table below presents the most frequently used commands on HPCC. A complete list can be found at the SLURM documentation page. Please also see this SLURM cheatsheet.

Command Example Usage Description
srun srun my_program --arg foo Run parallel jobs; often used within job scripts.
salloc salloc -c 2 --time=1:00:00 Request an interactive job on a compute node.
sbatch sbatch my_job.sb Used to submit batch jobs to the SLURM scheduler.
squeue squeue -u user123 View information about jobs - pending or running - in the queue.
scancel scancel 123456789 Used to cancel jobs or job steps that are under the control of SLURM.
sacct sacct -o "JobID,AllocCPUS,State" Display accounting data for all jobs (and job steps) - running, pending, or ended - stored in the SLURM database.
sprio sprio -j 123456789 View the factors considered for a job's scheduling priority.
sinfo sinfo -p general-long-gpu View status information SLURM nodes and partitions.