sacct
The "sacct" command-line tool is used in the Slurm workload manager to display information about completed or running jobs on a cluster. It stands for "Slurm accounting" and provides an overview of job-related accounting and system resource utilization.
By default, "sacct" provides a summary of all jobs currently running in the cluster, including their job ID, state, start and end times, and various resource utilization metrics. It can also be used to retrieve detailed information about a specific job by specifying its job ID.
Among the various options available, the "--format" option allows users to customize the output of "sacct" by selecting specific fields to display, such as job ID, submit time, nodes, partition, etc. Additionally, "--starttime" and "--endtime" options provide a way to filter the output based on specific time ranges.
The "--usage" option allows users to display the sum of all resources consumed by their jobs, such as CPU time, memory usage, and disk usage. The "--state" option can be used to filter the output based on the job state, allowing users to check the status of completed or failed jobs.
Overall, "sacct" is a powerful command-line tool that offers valuable insights into job accounting and resource utilization in a Slurm-managed cluster, providing users with relevant information to monitor and manage their jobs effectively.
List of commands for sacct:
-
sacct:tldr:5f1a7 sacct: Display job id, job name, partition, account, number of allocated cpus, job state, and job exit codes for recent jobs.$ saccttry on your machineexplain this command
-
sacct:tldr:95af0 sacct: Display elapsed time, job name, number of requested CPUs, and memory requested of a job.$ sacct --jobs ${job_id} --format=${elapsed},${jobname},${reqcpus},${reqmem}try on your machineexplain this command
-
sacct:tldr:b0987 sacct: Display job id, job state, job exit code for recent jobs.$ sacct --brieftry on your machineexplain this command
-
sacct:tldr:c3f1c sacct: Display the allocations of a job.$ sacct --jobs ${job_id} --allocationstry on your machineexplain this command