You are here

Slurm User Commands



Basic Slurm commands:


  • sbatch - Submit a batch script to Slurm.
  • squeue - View information about jobs located in the Slurm scheduling queue.
  • scancel - Used to signal jobs or job steps that are under the control of Slurm.
  • scontrol - View or modify Slurm job state.
  • sinfo - View information about Slurm nodes and partitions.

Convenient Slurm commands:


Information about Jobs:


  • sbatch --test-only myscript.sh (Verify job script and check when your job is estimated to run)
  • squeue -u <user> (List all current jobs for a user)
  • squeue -u <user> -t RUNNING (List all running jobs for a user)
  • squeue -u <user> -t PENDING (List all pending jobs for a user)
  • squeue -u <user> -p <production> (List all jobs for a user in the partition of production)
  • squeue -u <user> --start (List all jobs estimated job start time for a user)
  • scontrol show jobid -dd <jobid> (List detailed information for a job with specified jobid)

Controlling Jobs:


  • scancel <jobid1>,<jobid1> (Delete your own jobs with jobid)
  • scancel -t PENDING -u <user> (Cancel all pending jobs for a user)
  • scancel --name jobname (Cancel one or more jobs by name)
  • scontrol hold <jobid> (Hold the job of jobid being scheduled)
  • scontrol release <jobid> (Release a held job to be scheduled)
  • scontrol requeue <jobid) (Cancel and rerun a job)