Hi all,
I have recently upgraded my cluster to Slurm 25.11.2 (running on Rocky Linux 9). slurm-25.11.2-1.el9.x86_64 built locally.
This time I built accounting in and so I'm new to sacct.
When I run sacct without a state filter, I see the jobs correctly marked as COMPLETED:
sacct -a -S 2026-01-26 --format=JobID,State | grep COMPLETED | head -10 9 COMPLETED 9.batch COMPLETED 9.extern COMPLETED 9.0 COMPLETED 39 COMPLETED 39.batch COMPLETED 39.extern COMPLETED 39.0 COMPLETED 40 COMPLETED 40.batch COMPLETED
When I attempt to filter for those exact states (using either the short or long flag), the output is empty: sacct -a -S 2026-01-26 --format=JobID,State --state=completed JobID State ------------ ----------
(no output beyond the heading)
Am I using it wrong?
Cheers, Norm.
On 1/26/26 7:36 pm, Norman Gaywood via slurm-users wrote:
When I attempt to filter for those exact states (using either the short or long flag), the output is empty: sacct -a -S 2026-01-26 --format=JobID,State --state=completed
This thing about sacct trips a lot of people (including me) up at various times. There's a section in the man page about it:
https://slurm.schedmd.com/sacct.html#SECTION_DEFAULT-TIME-WINDOW
For your use case:
WITHOUT --jobs AND WITH --state specified: --starttime defaults to Now. --endtime defaults to --starttime and to Now if --starttime is not
specified.
So short version is you need to specify an end time - here's an example of your command from one of our small test systems.
17:39:16 csamuel@muller-mgr:~> sacct -a -S 2026-01-26 --format=JobID,State --state=completed -n | wc -l 0
17:39:20 csamuel@muller-mgr:~> sacct -a -S 2026-01-26 --format=JobID,State --state=completed -n --end=NOW | wc -l 1226
Hope that helps!
All the best, Chris
Thanks Chris!
You're a legend! Adding the --end=NOW did the trick.
Cheers, Norm
On Tue, 27 Jan 2026 at 12:42, Christopher Samuel via slurm-users < slurm-users@lists.schedmd.com> wrote:
On 1/26/26 7:36 pm, Norman Gaywood via slurm-users wrote:
When I attempt to filter for those exact states (using either the short or long flag), the output is empty: sacct -a -S 2026-01-26 --format=JobID,State --state=completed
This thing about sacct trips a lot of people (including me) up at various times. There's a section in the man page about it:
https://slurm.schedmd.com/sacct.html#SECTION_DEFAULT-TIME-WINDOW
For your use case:
WITHOUT --jobs AND WITH --state specified: --starttime defaults to Now. --endtime defaults to --starttime and to Now if --starttime is not
specified.
So short version is you need to specify an end time - here's an example of your command from one of our small test systems.
17:39:16 csamuel@muller-mgr:~> sacct -a -S 2026-01-26 --format=JobID,State --state=completed -n | wc -l 0
17:39:20 csamuel@muller-mgr:~> sacct -a -S 2026-01-26 --format=JobID,State --state=completed -n --end=NOW | wc -l 1226
Hope that helps!
All the best, Chris -- Chris Samuel : http://www.csamuel.org/ : Philadelphia, PA, USA
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com