[slurm-users] sacct 25.11.2: --state filter returns no results

8 views
Skip to first unread message

Norman Gaywood via slurm-users

unread,
Jan 26, 2026, 7:38:55 PM (6 days ago) Jan 26
to slurm...@lists.schedmd.com
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.

Christopher Samuel via slurm-users

unread,
Jan 26, 2026, 8:42:18 PM (6 days ago) Jan 26
to slurm...@lists.schedmd.com
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...@lists.schedmd.com
To unsubscribe send an email to slurm-us...@lists.schedmd.com

Norman Gaywood via slurm-users

unread,
Jan 26, 2026, 9:36:47 PM (6 days ago) Jan 26
to Christopher Samuel, slurm...@lists.schedmd.com
Thanks Chris!

You're a legend! 
Adding the --end=NOW did the trick.

Cheers,
Norm
Reply all
Reply to author
Forward
0 new messages