Use the ‘sbatch’ command to submit your jobs:
[johnchris@andromeda ~]$ sbatch stata_test.sl
scancel
Use the ‘scancel’ command to withdraw a job:
[johnchris@andromeda ~]$ scancel 2217697
sacct
‘sacct’ displays accounting data for all jobs and job steps in the Slurm job accounting log or Slurm Database, providing both live and historic data.
‘sacct’ can track users’ recent jobs and display job IDs and other details:
[johnchris@andromeda ~]$ sacct
JobID JobName Partition Account AllocCPUS State ExitCode
-------------------------------------------------------------------------------------
2217697 sample long johnchris 48 CANCELLED+ 0:0
2217698 sample long johnchris 48 PENDING 0:0
2217702 sample long johnchris 48 PENDING 0:0
2217703 bash short johnchris 4 RUNNING 0:0
2217703.ext+ extern johnchris 4 RUNNING 0:0
2217703.0 bash johnchris 4 RUNNING 0:0
‘sacct -j jobid’ will display only the specified job(s):
[johnchris@andromeda ~]$ sacct -j 2193166
JobID JobName Partition Account AllocCPUS State ExitCode
------------ --------- ---------- --------- ---------- ---------- --------
2216924 sample short johnchris 12 RUNNING 0:0
2216924.bat+ batch short johnchris 12 RUNNING 0:0
2216924.ext+ extern short johnchris 12 RUNNING 0:0
‘sacct’ can provide a detailed report on the memory, CPU, and other usage metrics of a job:
[johnchris@andromeda ~]$ sacct -j 2412831 --format JobID,Elapsed,ReqMem,MaxRSS,AllocCPUs,TotalCPU,State
JobID Elapsed ReqMem MaxRSS AllocCPUS TotalCPU State
------------ -------- ------- ------- --------- -------- ---------
2412831 03:39:19 128Gn 128 128 00:00:00 RUNNING
2412831.bat+ 03:39:19 128Gn 32 128 00:00:00 RUNNING
2412831.ext+ 03:39:19 128Gn 128 128 00:00:00 RUNNING
2412831.0 03:38:50 128Gn 3 128 00:00:00 RUNNING
scontrol
‘scontrol show job jobid’ will show detailed information about the job with the specified ID, including the job script:
[johnchris@andromeda ~]$ scontrol show job 2412831
JobId=4490999 JobName=Jupyter
UserId=johnchris(397590777) GroupId=johnchris(397590777) MCS_label=N/A
Priority=635588 Nice=0 Account=tianees QOS=normal WCKey=*
JobState=RUNNING Reason=None Dependency=(null)
Requeue=1 Restarts=1 BatchFlag=2 Reboot=0 ExitCode=0:0
RunTime=5-17:23:51 TimeLimit=30-00:00:00 TimeMin=N/A
SubmitTime=2025-06-24T18:24:01 EligibleTime=2025-06-24T18:26:02
AccrueTime=2025-06-24T18:26:02
StartTime=2025-06-24T18:26:12 EndTime=2025-07-24T18:26:12 Deadline=N/A
SuspendTime=None SecsPreSuspend=0 LastSchedEval=2025-06-24T18:26:12 Scheduler=Backfill
Partition=tianees AllocNode:Sid=a002:1708834
ReqNodeList=(null) ExcNodeList=g[001-009]
NodeList=cht002
BatchHost=cht002
NumNodes=1 NumCPUs=62 NumTasks=1 CPUs/Task=62 ReqB:S:C:T=0:0::
ReqTRES=cpu=62,mem=58G,node=1
AllocTRES=cpu=62,mem=58G,node=1
Socks/Node=* NtasksPerN:B:S:C=0:0:: CoreSpec=*
MinCPUsNode=62 MinMemoryNode=58G MinTmpDiskNode=0
Features=(null) DelayBoot=00:00:00
OverSubscribe=OK Contiguous=0 Licenses=(null) Network=(null)
Command=/home/johnchris/jupyter.sl
WorkDir=/home/johnchris
StdErr=/home/johnchris/jupyter.out
StdIn=/dev/null
StdOut=/home/johnchris/jupyter.out
Power=
TresPerTask=cpu:62
MailUser=johnchris@bc.edu MailType=BEGIN,END,FAIL