NAME
slurm-efficiency - Report time and memory efficiency (requested vs used) of recently finished Slurm jobs
VERSION
version 0.22.0
SYNOPSIS
slurm-efficiency [options]
DESCRIPTION
slurm-efficiency reads sacct and reports, for each recently finished job, how much of the requested wall-clock time and memory was actually used.
It stitches together the main allocation row (which carries the requested time limit and requested memory) with the step rows (which carry the peak resident memory, MaxRSS) and reports per job:
ID | Name | State | Actual_Duration | %Time | MaxMem | %Mem
State labels are colour-coded (COMPLETED, FAILED, TIMEOUT, OUT_OF_MEMORY, CANCELLED, ...) unless colour is disabled or output is not a terminal.
If sacct rejects the query because the date range is too wide, the error is captured and a friendly hint to reduce --days is shown.
OPTIONS
- -d, --days INT
-
Look back N days from now (default: 7). Ignored if
--startis given. - -S, --start DATE
-
Start date in
YYYY-MM-DDformat. Overrides--days. - -E, --end DATE
-
End date in
YYYY-MM-DDformat. - -s, --state LIST
-
Filter by Slurm state, e.g.
COMPLETED,FAILED,TIMEOUT,OUT_OF_MEMORY. - --sort KEY
-
Sort rows by
id(default),time(percentage of time used), ormem(percentage of memory used). Sorting bymemhelps spot over-allocation. - --csv
-
Emit CSV to STDOUT instead of the aligned, coloured table.
- -n, --no-color
-
Disable colour output.
- --version
-
Show the version of the script.
- -h, --help
-
Show help and exit.
NOTES
%Time= Elapsed / Timelimit. Jobs on an UNLIMITED partition show-.%Mem= MaxRSS / requested memory.ReqMemis scaled by allocated CPUs or nodes when it is expressed per-CPU (...c) or per-node (...n).Very short jobs sometimes record no MaxRSS; those show
-.
EXAMPLES
# Last 7 days (default)
slurm-efficiency
# Last 14 days
slurm-efficiency --days 14
# Only failed / timed-out / OOM jobs
slurm-efficiency --state FAILED,TIMEOUT,OUT_OF_MEMORY
# Spot over-allocated memory
slurm-efficiency --sort mem
# Machine-readable
slurm-efficiency --csv > efficiency.csv
AUTHOR
Andrea Telatin <proch@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023-2025 by Andrea Telatin.
This is free software, licensed under:
The MIT (X11) License