[slurm-users] Two lines are printed by sacct

706 views
Skip to first unread message

Mahmood Naderan

unread,
Apr 11, 2018, 2:01:40 PM4/11/18
to Slurm User Community List
Hi,
I would like to know why the sacct command which I am usinig that to
get some reports, shows two lines for each job. For example


[mahmood@rocks7 g]$ sacct --format=start,end,elapsed,ncpus,cputime,user
Start End Elapsed NCPUS
CPUTime User
------------------- ------------------- ---------- ----------
---------- ---------
2018-04-11T22:06:58 2018-04-11T22:19:33 00:12:35 16
03:21:20 mahmood
2018-04-11T22:06:58 2018-04-11T22:19:33 00:12:35 16
03:21:20


The second line doesn't show the user name.



Regards,
Mahmood

Christopher Samuel

unread,
Apr 11, 2018, 8:02:42 PM4/11/18
to slurm...@lists.schedmd.com
On 12/04/18 04:00, Mahmood Naderan wrote:

> Hi,

Hi Mahmood,

> I would like to know why the sacct command which I am usinig that to
> get some reports, shows two lines for each job.

sacct reports one line per job step by default, not per job.

If you add the 'JobName' field to your sacct command you'll see what the
steps are.

You can collapse the job steps down into a single line with the -X flag:

-X, --allocations
Only show cumulative statistics for each job, not the
intermediate steps.


Hope that helps,
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC

Mahmood Naderan

unread,
Apr 12, 2018, 12:57:06 AM4/12/18
to Slurm User Community List
May I ask what is the purpose to view intermediate job steps?
Also, today when I run sacct command, I only see the last two jobs

[mahmood@rocks7 g]$ sacct -a
JobID JobName Partition Account AllocCPUS State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
7 g-test CLUSTER local 6 CANCELLED+ 0:0
7.batch batch local 6 CANCELLED 0:15
8 g-test CLUSTER local 6 CANCELLED+ 0:0
8.batch batch local 6 CANCELLED 0:15


Is that normal?

Regards,
Mahmood

Christopher Samuel

unread,
Apr 12, 2018, 1:03:43 AM4/12/18
to slurm...@lists.schedmd.com
On 12/04/18 14:56, Mahmood Naderan wrote:

> May I ask what is the purpose to view intermediate job steps?

Because for MPI jobs that's where all the information is. The first
step is just the batch script.

> Also, today when I run sacct command, I only see the last two jobs
>
[...]
>
> Is that normal?

Yes, by default sacct only shows you the jobs that finished today.
Otherwise you'd overwhelm slurmdbd with all the jobs since the start
of time which on big systems will be in the millions.

All the best,

Mahmood Naderan

unread,
Apr 13, 2018, 10:27:40 AM4/13/18
to Slurm User Community List
Excuse me, I see three lines also!

[root@rocks7 ~]# sacct --format=user,cputime,elapsed
User CPUTime Elapsed
--------- ---------- ----------

mahmood 02:44:00 00:10:15
02:44:00 00:10:15
mahmood 19:25:52 00:18:13
09:42:56 00:18:13
00:18:12 00:18:12
mahmood 1-00:36:16 00:11:32
06:09:04 00:11:32
00:34:36 00:11:32

What are those? What should I mention in the format option to see the
proper information about three lines of a jobs?


Regards,
Mahmood

Chris Samuel

unread,
Apr 13, 2018, 11:03:37 PM4/13/18
to slurm...@lists.schedmd.com
On Saturday, 14 April 2018 12:00:59 AM AEST Mahmood Naderan wrote:

> What are those? What should I mention in the format option to see the
> proper information about three lines of a jobs?

Yes. Even just running "sacct" on its own will tell you that information, the
reason it doesn't at the moment is because you're telling it not to tell you.
Reply all
Reply to author
Forward
0 new messages