Skip to main content

sacct

Overview

sacct is the command in Slurm for viewing job accounting data:

  • Display detailed information for completed jobs
  • Provide more comprehensive historical job data than squeue
  • Support complex filtering and formatted output

Common Options

OptionDescriptionExample
-jFilter by job IDsacct -j 12345,12346
-uFilter by usersacct -u user1,user2
-S-ESpecify start and end timesacct -S2022-02-18-11:40 -E2022-03-03-12:00
-THandle jobs spanning time rangessacct -T
-pParsable output (delimiter |)sacct -p
-XShow job-level information onlysacct -X
-oCustom output fieldssacct -o "JobID,JobName,Partition,Elapsed"
--formatSame as -osacct --format=JobID%15,State%10
-nHide headerssacct -n
-PParsable output (delimiter |)sacct -P
--page-jobsSet number of jobs per pagesacct --page-jobs 100
--page-last-jobidSet the last jobid from previous querysacct --page-last-jobid 123

Examples

View details for a specific job

sacct -j 12345

View jobs for the current user

sacct -u $USER

Complex time filtering

sacct -T -S2022-02-18-11:40 -E2022-03-03-12:00

Filter by state

sacct -s COMPLETED,FAILED

Generate CSV output

sacct -P -o "JobID,JobName,Partition,State,Elapsed" > jobs.csv

View job resource usage

sacct -o "JobID,JobName,AllocCPUS,ReqMem,Elapsed" -X

Output Field Details

FieldDescription
JobIDJob ID
JobNameJob name
PartitionPartition name
AccountAccount name
UserUsername
StateJob state
SubmitSubmit time
StartStart time
EndEnd time
ElapsedElapsed time
EligibleTime eligible to run
ReqCPUSRequested CPU count
AllocCPUSAllocated CPU count
ReqMemRequested memory
AllocNodesAllocated node count