Basic Slurm Commands
The table below shows the list of the most common used Slurm commands.
| Commands |
Syntax |
Example |
Description |
| sbatch |
sbatch <job script> |
sbatch myscript.sh |
Submits a batch script to Slurm. |
| sinfo |
sinfo |
sinfo -p bigmem -l |
Displays information about the resources available on the cluster. |
| squeue |
squeue <options> or simply squeue |
squeue -u john.doe@jacks.local |
Shows job information for the cluster.
When run with squeue -u $USER option, it will show only your jobs in queue. |
| srun |
srun <resource_parameters> |
srun -p bigmem --pty bash |
Allows running interactively on the cluster.
For example: srun --nodes=1 -p compute -t 1:00:00 --pty /bin/bash
The command above would request 1 node in the compute partition for 1 hour. |
| scancel |
scancel <job_id> or <user> |
scancel 12243 |
Cancels a running or queued job with job_id or cancels all with the -u flag.
Example: scancel 12223 for individual jobs or scancel -u $USER for all jobs |