1

Is there a way to get the last x SLURM job ids of (finished) jobs for a certain user (me)?

Or maybe all job IDs run the x-hours?

(My use case is, that I want to get some metrics via a sacctbut idealy don't want to parse them from outputfiles etc.)

For the next time it's maybe adviseable to plan this in advance, like here

Helmut
  • 311
  • 1
  • 9

1 Answers1

2

To strictly answer the question, you can use sacct like this:

sacct -X --start now-3hours -o jobid

This will list the jobs of the jobs that started within the past 3 hours.

But then, if what you want is to feed those job IDs to sacct to get metrics, you can directly add the metrics to the -o option, or remove that -o option altogether.

Also, the -X is there to have one line per job, but memory-related metrics are stored per job step, so you might want to remove it at some point to get one line per job step instead..

damienfrancois
  • 52,978
  • 9
  • 96
  • 110