15

One idea I have to find out how long my slurm job is taking is to use

squeue --job <myid>

How do I find out how long my job took to complete though once the job is complete?

1
  • I cannot actually create a slurm tag because my rep is not high enough, but is how I would have tagged it had I the ability to
    – demongolem
    Nov 2, 2014 at 0:22

3 Answers 3

19

Use the sacct command:

sacct -l -j <myid>

and look for the 'elapsed' column

3
  • 6
    +1, but more information here. The output of -l didn't fit in my window, so a minimal output is sacct --format="Elapsed" -j <myid>.
    – Sparhawk
    Jun 6, 2016 at 2:46
  • This is the best solution yet Dec 19, 2019 at 11:46
  • Does this include the Slurm overhead?
    – Manolete
    Nov 6, 2020 at 22:46
9
sacct -j <myid> --format=Elapsed

is a very succinct way to show this (Thanks to Sparhawk & damienfrancois for these suggestions, I thought I'd suggest this as a full answer).

0

Adding on previous answers, if you didn't save the JobID, you can use:

sacct --format=JobID,JobName,State,Elapsed

This will give you the last jobs, its state (RUNNING, FAILED, COMPLETE...) and the time it took (Elapsed).

You can then grep for those that have been completed, or those with a given JobName

New contributor
Núria Fàbrega is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 12 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .