Skip to main content

sacct

sacct

sacct: displays accounting data for all jobs and job steps in the Slurm job accounting log or Slurm database

If you use the command without any paremeters it will show you the currently running jobs accounting data.

$ sacct

       JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
1127         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1128         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1128.0            a.out                  incd         16    RUNNING      0:0
1129         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1129.0            a.out                  incd         16    RUNNING      0:0
1130         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1156         run_zacar+ HPC_4_Days       root          1    RUNNING      0:0

You can specify the job which data you would like to view by using the -j flag.

$ sacct -j 1156

JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
1156         run_zacar+ HPC_4_Days       root          1    RUNNING      0:0

You can list jobs by user, by adding the -u flag and choosing the user.

$ sacct -u jprmachado

       JobID    JobName  Partition    Account  AllocCPUS      State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
1127         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1128         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1128.0            a.out                  incd         16    RUNNING      0:0
1129         omp-bkp-o+      debug       incd         16    RUNNING      0:0
1129.0            a.out                  incd         16    RUNNING      0:0
1130         omp-bkp-o+      debug       incd         16    RUNNING      0:0

You can also filter or create your own custom reports by using the --format flag and choosing what data to show.

$ sacct --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist

     User        JobID    JobName  Partition      State  Timelimit               Start                 End    Elapsed     MaxRSS  MaxVMSize   NNodes      NCPUS        NodeList
--------- ------------ ---------- ---------- ---------- ---------- ------------------- ------------------- ---------- ---------- ---------- -------- ---------- ---------------
jprmacha+ 1127         omp-bkp-o+      debug    RUNNING 20-20:00:+ 2019-11-20T11:44:28             Unknown 9-04:00:00                              1         16           wn018
jprmacha+ 1128         omp-bkp-o+      debug    RUNNING 20-20:00:+ 2019-11-20T11:46:43             Unknown 9-03:57:45                              1         16           wn019
          1128.0            a.out               RUNNING            2019-11-20T11:46:43             Unknown 9-03:57:45                              1         16           wn019
jprmacha+ 1129         omp-bkp-o+      debug    RUNNING 20-20:00:+ 2019-11-20T11:51:30             Unknown 9-03:52:58                              1         16           wn020
          1129.0            a.out               RUNNING            2019-11-20T11:51:31             Unknown 9-03:52:57                              1         16           wn020
jprmacha+ 1130         omp-bkp-o+      debug    RUNNING 20-20:00:+ 2019-11-20T11:52:37             Unknown 9-03:51:51                              1         16           wn012
     root 1156         run_zacar+ HPC_4_Days    RUNNING 8-00:00:00 2019-11-27T13:40:02             Unknown 2-02:04:26                              1          1           wn035

There is also the possibility to filter you custom report by user and date, you just have to add the -u and --start flags.

$ sacct --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist -u zbenta --start 2019-11-28

     User        JobID    JobName  Partition      State  Timelimit               Start                 End    Elapsed     MaxRSS  MaxVMSize   NNodes      NCPUS        NodeList
--------- ------------ ---------- ---------- ---------- ---------- ------------------- ------------------- ---------- ---------- ---------- -------- ---------- ---------------
   zbenta 1163           clover32     stage2    TIMEOUT   04:00:00 2019-11-28T13:22:31 2019-11-28T17:22:46   04:00:15                              8        128     wn[022-029]
          1163.batch        batch             CANCELLED            2019-11-28T13:22:31 2019-11-28T17:22:47   04:00:16     40152K    186176K        1         16           wn022
          1163.0            orted                FAILED            2019-11-28T13:22:35 2019-11-28T17:22:46   04:00:11     38104K    254748K        7          7     wn[023-029]

You can also use the flags to give you a report during a specific time interval, just use the --start and --end flags.

$ sacct --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRss,MaxVMSize,nnodes,ncpus,nodelist -u zbenta --start 2019-10-07 --end 2019-10-11

     User        JobID    JobName  Partition      State  Timelimit               Start                 End    Elapsed     MaxRSS  MaxVMSize   NNodes      NCPUS        NodeList
--------- ------------ ---------- ---------- ---------- ---------- ------------------- ------------------- ---------- ---------- ---------- -------- ---------- ---------------
   zbenta 15            Run_PRISM      debug     FAILED 365-00:00+ 2019-10-07T11:05:58 2019-10-07T11:06:09   00:00:11                              2         32     wn[018-019]
          15.batch          batch                FAILED            2019-10-07T11:05:58 2019-10-07T11:06:09   00:00:11                              1         16           wn018
          15.0              orted             COMPLETED            2019-10-07T11:06:02 2019-10-07T11:06:07   00:00:05                              1          1           wn019
   zbenta 20            Run_PRISM      debug CANCELLED+  UNLIMITED 2019-10-08T11:42:01 2019-10-08T12:12:03   00:30:02                              2         32     wn[018-019]
          20.batch          batch             CANCELLED            2019-10-08T11:42:01 2019-10-08T12:12:05   00:30:04   2626556K    186140K        1         16           wn018
          20.0              orted                FAILED            2019-10-08T11:42:05 2019-10-08T12:12:08   00:30:03   2594880K    292116K        1          1           wn019
   zbenta 28            Run_PRISM      debug     FAILED  UNLIMITED 2019-10-11T14:33:06 2019-10-11T14:33:06   00:00:00                              2         32     wn[003,015]
          28.batch          batch                FAILED            2019-10-11T14:33:06 2019-10-11T14:33:06   00:00:00                              1         16           wn003

**For more detailed information, please see the manual man sacct **