sacct is a tool that displays accounting data for all jobs and job steps in the SLURM job accounting log or SLURM database
The sacct command displays job accounting data stored in the job accounting log file or SLURM database in a variety of forms for your analysis. The sacct command displays information on jobs, job steps, status, and exitcodes by default.