How to make `sacct` list jobs older than 24 hours ago?
Feb 19, 2:16am

To list jobs older than 24 hours ago using the sacct command (part of the Slurm workload manager), you need to use the --starttime and --endtime options to specify a time range. Here’s how you can do it:

Command

bash
sacct --starttime 2026-02-18 --format=JobID,JobName,Partition,Account,AllocCPUS,State,ExitCode,Start,End,Elapsed,NodeList%30

Explanation:

  • --starttime 2026-02-18: This sets the start time to yesterday (February 18, 2026), so only jobs that started before today are included.
  • --format: Customizes the output columns. You can adjust the fields as needed.

Example with Custom Time Range

If you want to list jobs that ended more than 24 hours ago, you can use:

bash
sacct --endtime 2026-02-18 --format=JobID,JobName,Partition,Account,AllocCPUS,State,ExitCode,Start,End,Elapsed,NodeList%30

Notes:

  • Replace 2026-02-18 with the appropriate date if you want to go further back.
  • You can also use relative time formats like 2026-02-18T00:00:00 for more precision.
  • If you want to see jobs that started and ended before a certain time, combine --starttime and --endtime.

Common Use Cases

  • List all jobs older than 24 hours:
    bash
    sacct --starttime 2026-02-18
  • List jobs that ended more than 24 hours ago:
    bash
    sacct --endtime 2026-02-18

Would you like help filtering for a specific user or job state?

Feb 19, 2:16am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more