CHTC — Center for High Throughput Computing
CHTC — Center for High Throughput Computing
UW-Madison College of Computing, Data & Information SciencesMorgridge Institute for Research

Quick reference: Slurm and HPC commands

Introduction

This page lists common Slurm commands and options for jobs. Users familiar with Slurm and job submission on CHTC's High Performance Computing (HPC) system can use this page as a quick reference. For users who are just starting out, we suggest reading the full guides to understand the full context of each command or option.

Please note the following!

  • Bracketed items (<>) denote where to place your input. Do not include the brackets in your command.
  • All commands should be entered on a single line.

Submit jobs

See our job submission guide for more information.

CommandUseNotes
sbatch <executable.sh>submits job(s) as specified by executable.sh.We recommend using sbatch over the other methods.
srun --mpi=pmix -n4 -N1 -p int --pty bashsubmits an interactive job (intended for simple testing/compiling)The example uses 4 cores, 1 node, and submits to the interactive partition
scancel <job_ID>removes the job(s) associated with job_ID.
scontrol hold <job_ID>holds the job(s) associated with job_ID and leaves it in the queue.
scontrol release <job_ID>releases the held job associated with job_ID to the queue.

Submit jobs using salloc

We recommend using sbatch to submit jobs (see above) instead of salloc. See this guide for more information.

CommandUseNotes
salloc -n4 -N1 -p int requests an allocation for a jobThe example uses 4 cores, 1 node, and submits to the interactive partition
srun --mpi=pmix </path/to/mpi/script>executes a script using allocated resources (salloc)
srun --mpi=pmix --pty bashsubmits an interactive job using allocated resources (salloc)
echo $SLURM_JOB_IDcheck to see if you are currently using an allocation. If so, a job ID is returned.
exitend your allocation

Monitor jobs

Use these commands to monitor your submitted jobs.

CommandUse
squeue --medisplays status of your submitted jobs
squeue -u <username>displays status of your submitted jobs by username
squeue -p <partition>displays status of your submitted jobs by partition
seff <job_ID>view job performance

View job information with sacct

sacct displays information about job(s) from the SLURM database. The table below displays options to filter information. Multiple options may be combined.

sacct --jobs <job_ID>,<job_ID>filters by job_ID
sacct --start=<YYYY-MM-DD>filters jobs starting from date YYYY-MM-DD
sacct --end=<YYYY-MM-DD>filters jobs ending by date YYYY-MM-DD.Should be used with --start, since the default option only returns jobs from the current day.

Machine information

These commands display information about the machines that execute jobs.

CommandUseNotes
sinfodisplays information about nodes
sinfo -n <node>displays information about specified nodeExample: sinfo -n spark-a006
sinfo -p <partition>displays information about specified partitionExample: sinfo -p pre

Modules

These commands access software in the module system. Read this guide for more information.

CommandUse
module availdisplays available software modules
module spider <keyword>searches for <keyword> in available modules
module load <module>loads <module>
module unload <module>unloads <module>
module listshows all currently loaded modules
module purgeunloads all modules

Check quotas

CommandUse
get_quotasshows your /home and /scratch disk and files quota
get_quotas -p <path>shows the disk and files quota for a specified path, such as a group directory

Was this page helpful?

Website feedback, questions or accessibility issues:chtc@cs.wisc.edu
Privacy Notice| © 2026 The Board of Regents of theUniversity of Wisconsin System