Skip to content

Job Accounting

Job Accounting

Accounting information for completed jobs, use the sacct command. (current day)

       JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
17692              Job0    compute   testproj         64 CANCELLED+      0:0
17693              Job1    compute   testproj          1  COMPLETED      0:0

You can tailor the output with the use of the --format= option to specify the fields to be shown.

sacct --format=jobid,jobname,partition,user%12,account%12,alloccpus,nnodes,elapsed,cputime,state,exitcode
-e, --helpformat
Print a list of fields that can be specified with the --format option.

-S, --starttime
Select jobs eligible after the specified time. Default is midnight of current day. If states are given with the -s option then return jobs in this state at this time, 'now' is also used as the default time.
Valid time formats are...

HH:MM[:SS] [AM|PM]
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
MM/DD[/YY]-HH:MM[:SS]
YYYY-MM-DD[THH:MM[:SS]]

Accounting information for running jobs, use the sstat command.

sstat --format=AveCPU,AvePages,AveRSS,AveVMSize,JobID -j 11