[slurm-users] actual time of start (or finish) of a job

824 views
Skip to first unread message

Davide DelVento

unread,
Feb 15, 2023, 7:19:13 PM2/15/23
to slurm...@schedmd.com
I have a user who needs to find the actual start (or finish) time of a
number of jobs.
With the elapsed field of sacct start or finish become equivalent for
his search.

I see that information in /var/log/slurm/slurmctld.log so Slurm should
have it, however in sacct itself that information does not seem to
exist, and with all the queries we tried Google always thinks we are
looking for something else and never returns an actual answer.

If this was a one-off I could do it for him, but he needs to script it
for his reasons and I don't want to run his script as root nor give
him access to the log files forever.

Is there a way to find this information?

Thanks

Joseph Francisco Guzman

unread,
Feb 15, 2023, 7:30:27 PM2/15/23
to Slurm User Community List
Hi Davide,

I would use the Start and End fields with the sacct command. Something like this: "sacct -j jobid1,jobid2 -X -P -o jobid,start,end".

Were you able to take a look at the sacct manual page outlines what all of the different fields mean? Here's a link to the web version: https://slurm.schedmd.com/sacct.html.

Best,

Joseph

--------------------------------------------------------------
Joseph F. Guzman - ITS (Advanced Research Computing)

Northern Arizona University

Joseph....@nau.edu


From: slurm-users <slurm-use...@lists.schedmd.com> on behalf of Davide DelVento <davide....@gmail.com>
Sent: Wednesday, February 15, 2023 5:18 PM
To: slurm...@schedmd.com <slurm...@schedmd.com>
Subject: [slurm-users] actual time of start (or finish) of a job
 

Davide DelVento

unread,
Feb 15, 2023, 7:41:13 PM2/15/23
to Slurm User Community List
Thanks, that's exactly it.
I naively assumed that the '-l" in sacct provided "everything" (given
how long and unwieldy it is, but I noticed now that it isn't).
Sorry for the noise!

Florian Zillner

unread,
Feb 20, 2023, 11:42:44 AM2/20/23
to Slurm User Community List
Hi,

note that times reported by sacct may differ from the net times. For example, imagine a test job like this:
date
sleep 1m
date

sacct reports:
$ sacct -j 225145 -X -o jobid,start,end
JobID                      Start                 End
------------ ------------------- -------------------
225145       2023-02-20T17:31:12 2023-02-20T17:32:30

Whereas:
cat *out.225145
Mon Feb 20 17:31:29 CET 2023
Mon Feb 20 17:32:29 CET 2023

Sometimes these extra few seconds matter. So if you're looking for net runtimes, I'd suggest to ask the user to include a date command here and there in the submit script.

Cheers,
Florian

From: slurm-users <slurm-use...@lists.schedmd.com> on behalf of Davide DelVento <davide....@gmail.com>
Sent: Thursday, 16 February 2023 01:40
To: Slurm User Community List <slurm...@lists.schedmd.com>
Subject: [External] Re: [slurm-users] actual time of start (or finish) of a job
 
Thanks, that's exactly it.
I naively assumed that the '-l" in sacct provided "everything" (given
how long and unwieldy it is, but I noticed now that it isn't).
Sorry for the noise!

On Wed, Feb 15, 2023 at 5:32 PM Joseph Francisco Guzman
<Joseph....@nau.edu> wrote:
>
> Hi Davide,
>
> I would use the Start and End fields with the sacct command. Something like this: "sacct -j jobid1,jobid2 -X -P -o jobid,start,end".
>

Davide DelVento

unread,
Feb 20, 2023, 9:56:44 PM2/20/23
to Slurm User Community List
Thanks for pointing that out. In this case it doesn't matter, but I
can see how in others it may
Reply all
Reply to author
Forward
0 new messages