Skip to main content
Crusoe Support Help Center home page
Crusoe

FAQ: Slurm Commands Basics

Irman Mashiana
Irman Mashiana
Updated

Last Updated: Dec 24, 2025

Introduction

After you've setup your Slurm cluster, here are some useful commands to know on order to interact with your cluster. 

 

Prerequisites

 

Commands:

Command

Output / Options

Notes

sinfo

After SSHing into your login node, sinfo is used to view partition and node information. 

In this example, I have a slurm cluster of 2 nodes that are currently idle. 

squeue

 

squeue is used to view job and job step information for jobs managed by Slurm.
srun

srun will allow you to run parallel jobs across your cluster.

 

For example, to view all PCIe buses and devices attached to a node you would run: 

srun -N2 lspci

-N = specify number of nodes to run this job across

 

If you're using Infiniband, you can run a simple two node NCCL test to validate internode RDMA performance.

srun -N 2 --ntasks-per-node=8 --cpus-per-task=22 --mpi=pmix /opt/nccl-tests/build/all_reduce_perf -b 1M -e 1G -f 2 -g 1

sbatch

sbatch submits a batch script to Slurm.

 

In this example, a simple job is running across my cluster of 2 nodes. I then used squeue to view the job. 


This is very useful as you can see what job is running across your cluster 

scancel
scancel is used to signal or cancel jobs, job arrays or job steps.
scontrol

scontrol is used to view or modify Slurm configuration including: job, job step, node, partition, reservation, and overall system configuration.

 

 

For example, scontrol can be used with commands such as:

  • ping
    • checks state of ctld (head) nodes
  • show node (optional <node_name>)
    • view the state of node(s)
  • update node=<node_name> state=<X>
    • change node state - resume, etc.
  • reconfigure
    • sends all slurm nodes commands to restart and reread services
  • create reservation user=<> partition=<> starttime=<> duration=<> nodes=<node list>
    • this creates a reservation for a user or group for exclusive use of nodes
  • etc...
sdiag

...

sdiag shows information related to slurmctld execution about: threads, agents, jobs, and scheduling algorithms.
sacct Manipulates accounts, groups and jobs, queries sacct command displays job accounting data stored in the job accounting log file or Slurm database in a variety of forms for your analysis. The sacct command displays information on jobs, job steps, status, and exitcodes by default. You can tailor the output with the use of the --format= option to specify the fields to be shown.
sstat
sstat command displays job status information for your analysis. The sstat command displays information pertaining to CPU, Task, Node, Resident Set Size (RSS) and Virtual Memory (VM). You can tailor the output with the use of the --fields= option to specify the fields to be shown.
sprio
sprio is used to view the components of a job's scheduling priority when the multi-factor priority plugin is installed. sprio is a read-only utility that extracts information from the multi-factor priority plugin. By default, sprio returns information for all pending jobs. Options exist to display specific jobs by job ID and user name.

 

Additional Resources:

 

 

 

 

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Still need help?

Our support team is ready to assist you with any questions.

Have more questions? Submit a request

Recently Viewed

Comments

0 comments

Article is closed for comments.