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