Reputation: 436
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 sacct
but 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…
Upvotes: 2
Views: 2200
Reputation: 59072
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..
Upvotes: 3