1sreport(1)                      Slurm Commands                      sreport(1)
2
3
4

NAME

6       sreport - Generate reports from the slurm accounting data.
7
8

SYNOPSIS

10       sreport [OPTIONS...] [COMMAND...]
11
12

DESCRIPTION

14       sreport  is  used to generate reports of job usage and cluster utiliza‐
15       tion for Slurm jobs saved to the Slurm Database, slurmdbd.
16
17

OPTIONS

19       -a, --all_clusters
20              Use all clusters instead of only the cluster from which the com‐
21              mand was executed.
22
23       -M, --cluster
24              The  cluster(s)  to generate reports for. Default is local clus‐
25              ter, unless the local cluster is currently part of a  federation
26              and  in that case generate a report for all clusters in the cur‐
27              rent federation. If the clusters included in a  federation  vary
28              through time, use this option to identify the clusters to be in‐
29              cluded in report. Implies --local.
30
31       --federation
32              Generate a report for the federation if a member of one.
33
34       -h, --help
35              Print a help message describing the usage of sreport.
36
37       --local
38              Generate a report for the local cluster, even if part of a  fed‐
39              eration.  Overrides --federation.
40
41       -n, --noheader
42              Don't display header when listing results.
43
44       -p, --parsable
45              Output will be '|' delimited with a '|' at the end.
46
47       -P, --parsable2
48              Output will be '|' delimited without a '|' at the end.
49
50       -Q, --quiet
51              Print no warning or informational messages, only error messages.
52
53       -t <time_format>
54              Specify the output time format. Time format options are case in‐
55              sensitive and may be abbreviated. The default format is Minutes.
56              Supported  time  format  options  are listed in the time command
57              section below.
58
59       -T, --tres=<tres_names>
60              Trackable resource (TRES) to report values for.  By default  CPU
61              resource  use  is  reported (except for reservation reports. All
62              TRES types reserved by a reservation will be  shown  by  default
63              unless overridden with this option).  Multiple TRES names may be
64              separated using a comma separated list for  all  reports  except
65              the  job  reports, which can only support a single TRES name, or
66              "ALL" for all TRES.
67
68              The "Reported" Billing  TRES  is  calculated  from  the  largest
69              Billing  TRES of each node multiplied by the time frame. For ex‐
70              ample, if a node is part of multiple partitions and each  has  a
71              different  TRESBillingWeights  defined  the Billing TRES for the
72              node will be the highest of  the  partitions.   If  TRESBilling‐
73              Weights  is  not  defined  on  any partition for a node then the
74              Billing TRES will be equal to the number of CPUs on the node.
75
76              TRES node usage is no longer reported in percent  format  or  in
77              Cluster Utilization.  Please use TRES CPU instead.  The main is‐
78              sue with using node is in most configurations multiple jobs  are
79              able  to  run on the same node.  This makes TRES node accounting
80              count the same node multiple times in the same period.   In  ex‐
81              clusive node configurations, CPU accounting returns the same us‐
82              age node accounting would.
83
84       -v, --verbose
85              Print detailed event logging.
86
87       -V , --version
88              Print version information and exit.
89

COMMANDS

91       <keyword> may be omitted from the execute line and sreport will execute
92       in interactive mode. sreport will process commands as entered until ex‐
93       plicitly terminated.
94
95
96       exit   Terminate the execution of sreport.  Identical to the quit  com‐
97              mand.
98
99       help   Display a description of sreport options and commands.
100
101       nonparsable
102              Return  output  to  normal  after parsable or parsable2 has been
103              set.
104
105       parsable
106              Output will be | delimited with an ending '|'.
107
108       parsable2
109              Output will be | delimited without an ending '|'.
110
111       quiet  Print no warning or informational  messages,  only  fatal  error
112              messages.
113
114       quit   Terminate  the execution of sreport.  Identical to the exit com‐
115              mand.
116
117       time <time_format>
118              Specify the output time format. Time format options are case in‐
119              sensitive and may be abbreviated. The default format is Minutes.
120              Supported time format options include:
121
122              SecPer    Seconds/Percentage of Total
123
124              MinPer    Minutes/Percentage of Total
125
126              HourPer   Hours/Percentage of Total
127
128              Seconds   Seconds
129
130              Minutes   Minutes
131
132              Hours     Hours
133
134              Percent   Percentage of Total
135
136       verbose
137              Enable detailed event logging.
138
139       version
140              Display the sreport version number.
141
142       !!     Repeat the last command executed.
143

REPORT TYPES

145       Valid report types are:
146
147              cluster <REPORT> <OPTIONS>
148
149              job <REPORT> <OPTIONS>
150
151              reservation <REPORT> <OPTIONS>
152
153              user <REPORT> <OPTIONS>
154
155       <REPORT> options for each type include:
156
157              cluster
158                     AccountUtilizationByUser,       UserUtilizationByAccount,
159                     UserUtilizationByWckey,   Utilization,  WCKeyUtilization‐
160                     ByUser
161
162              job    SizesByAccount, SizesByAccountAndWcKey, SizesByWckey
163
164              reservation
165                     Utilization
166
167              user   TopUsage
168
169       NOTE: If OverSubscribe is configured to FORCE or YES in your slurm.conf
170       and  the  system  is not configured to use preemption (PreemptMode=OFF)
171       accounting can easily grow to values greater than the  actual  utiliza‐
172       tion.  It  may  be  common on such systems to get error messages in the
173       slurmdbd log stating: "We have more allocated time than is possible."
174
175

REPORT DESCRIPTION

177       cluster AccountUtilizationByUser
178              This report will display account utilization as  it  appears  on
179              the  hierarchical  tree.  Starting with the specified account or
180              the root account by default this report will list the underlying
181              usage  with  a sum on each level.  Use the 'tree' option to span
182              the tree for better visibility.
183
184              NOTE: Idle reservation time  will  be  split  evenly  among  ac‐
185              counts/users  given access to it. When a reservation is assigned
186              to whole accounts, the time will be counted in  the  association
187              for  the accounts, not the user associations in the accounts. In
188              this case, the usage of a parent account can be larger than  the
189              sum of its children.
190
191       cluster UserUtilizationByAccount
192              This  report  will display users by account in order of utiliza‐
193              tion without grouping multiple accounts by user  into  one,  but
194              displaying them on separate lines.
195
196       cluster UserUtilizationByWCKey
197              This  report will display users by wckey in order of utilization
198              without grouping multiple wckey by user into one, but displaying
199              them on separate lines.
200
201       cluster Utilization
202              This  report will display total usage divided amongst Allocated,
203              Down, Planned Down, Idle, and Planned time  for  selected  clus‐
204              ters.
205
206              Allocated
207
208                            Time that nodes were in use with active jobs or an
209                            active reservation.  This does not include  reser‐
210                            vations  created  with  the  MAINT  or IGNORE_JOBS
211                            flags.
212
213              Down
214
215                            Time that nodes were marked as Down or  time  that
216                            slurmctld was not responding (assuming TrackSlurm‐
217                            ctldDown is set in slurmdbd.conf).
218
219              Idle
220
221                            Time where nodes had no active  jobs  or  reserva‐
222                            tions.
223
224              OverCommitted
225
226                            Time  of  eligible  jobs waiting in the queue over
227                            the Planned time.  Unlike  Planned,  this  has  no
228                            limit. It is typically useful to determine whether
229                            your system is overloaded and by how much.
230
231              PlannedDown
232
233                            Time that nodes were in use by a reservation  cre‐
234                            ated  with  the MAINT flag but not the IGNORE_JOBS
235                            flag.
236
237              Planned
238
239                            Time that a node spent idle with eligible jobs  in
240                            the queue that were unable to start due to time or
241                            size constraints. The maximum time is  limited  to
242                            the amount of time possible on the system. If this
243                            value is not of importance for you then the number
244                            can be grouped with idle time.
245
246              TresCount
247
248                            Configured  number of TRES' on the reported nodes.
249                            See also the TresName field.
250
251              Note: Reservations created with the  IGNORE_JOBS  flag  are  not
252              tracked  in  the Cluster Utilization report due to the fact that
253              allowing any current/active jobs  to  continue  to  run  in  the
254              reservation  introduces the possibility for them to be accounted
255              for incorrectly.
256
257              Note: The default view for the "Cluster Utilization" report  in‐
258              cludes  the following fields: Cluster, Allocated, Down, Planned‐
259              Down, Idle, Planned, Reported. You can include additional fields
260              like  OverCommitted and TresCount fields with the Format option.
261              The TresName will also be included  if  using  the  -T,   --tres
262              <tres_names> option.
263
264       cluster WCKeyUtilizationByUser
265              This  report will display wckey utilization sorted by WCKey name
266              for each user on each cluster.
267
268       job SizesByAccount
269              This report will display the amount of time used for job  ranges
270              specified by the 'grouping=' option.  Only a single level in the
271              tree is displayed defaulting to the root dir.   If  you  specify
272              other accounts with the 'account=' option sreport will use those
273              accounts as the root account and you will receive the aggregated
274              totals of each listed account plus their sub accounts.
275
276       job SizesByAccountAndWckey
277              This  report  is very similar to SizesByAccount with the differ‐
278              ence being each account is pair with wckeys so the identifier is
279              account:wckey  instead of just account so there will most likely
280              be multiple accounts listed depending on the  number  of  wckeys
281              used.
282
283       job SizesByWckey
284              This  report  will display the amount of time for each wckey for
285              job ranges specified by the 'grouping=' option.
286
287       reservation Utilization
288              This report will display total usage  for  reservations  on  the
289              systems.   Note:  Time requests on this report will not truncate
290              the time the reservation used, only the reservations that ran at
291              any time during the period requested.
292
293       user TopUsage
294              Displays the top users on a cluster, i.e. users with the highest
295              usage.  By default users are sorted  by  CPUTime,  but  the  -T,
296              --tres option will sort users by the first TRES specified.
297
298              Use the group option to group accounts together.  The default is
299              to have a different line for each user account combination.
300
301       Each report type has various options...
302
303
304       OPTIONS FOR ALL REPORT TYPES
305
306
307              All_Clusters
308                     Use all monitored clusters. Default is local cluster.
309
310              Clusters=<OPT>
311                     List of clusters to include in report.  Default is  local
312                     cluster.
313
314              End=<OPT>
315                     Period ending for report. Default is 23:59:59 of previous
316                     day.  Valid time formats are...
317
318                     HH:MM[:SS] [AM|PM]
319                     MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
320                     MM/DD[/YY]-HH:MM[:SS]
321                     YYYY-MM-DD[THH:MM[:SS]]
322                     now[{+|-}count[seconds(default)|min‐
323                     utes|hours|days|weeks]]
324
325              Format=<OPT>
326                     Comma separated list of fields to display in report.
327
328                     When  using  the format option for listing various fields
329                     you can put a %NUMBER  afterwards  to  specify  how  many
330                     characters should be printed.
331
332                     e.g.  format=name%30  will  print  30 characters of field
333                     name right justified.  A -30  will  print  30  characters
334                     left justified.
335
336              Start=<OPT>
337                     Period start for report.  Default is 00:00:00 of previous
338                     day.  Valid time formats are...
339
340                     HH:MM[:SS] [AM|PM]
341                     MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
342                     MM/DD[/YY]-HH:MM[:SS]
343                     YYYY-MM-DD[THH:MM[:SS]]
344                     now[{+|-}count[seconds(default)|min‐
345                     utes|hours|days|weeks]]
346
347       OPTIONS SPECIFICALLY FOR CLUSTER REPORTS
348
349
350              Accounts=<OPT>
351                     When used with the UserUtilizationByAccount, or AccountU‐
352                     tilizationByUser, List of accounts to include in  report.
353                     Default is all.
354
355              Tree   When  used  with the AccountUtilizationByUser report will
356                     span the accounts as they are in the hierarchy.
357
358              Users=<OPT>
359                     When used with any report other than Utilization, List of
360                     users to include in report.  Default is all.
361
362              Wckeys=<OPT>
363                     When  used  with  the UserUtilizationByWckey or WCKeyUti‐
364                     lizationByUser, List of wckeys to include in report.  De‐
365                     fault is all.
366
367       OPTIONS SPECIFICALLY FOR JOB REPORTS
368
369
370              Accounts=<OPT>
371                     List  of  accounts  to use for the report. Default is all
372                     which will show only one line corresponding to the totals
373                     of  all accounts in the hierarchy.  This explanation does
374                     not apply when ran with the FlatView or AcctAsParent  op‐
375                     tions.
376
377              AcctAsParent
378                     When  used with the SizesbyAccount(*) will take specified
379                     accounts as parents and the next layer of accounts  under
380                     those  specified will be displayed. Default is root if no
381                     specific Accounts are requested.  When FlatView is  used,
382                     this option is ignored.
383
384              FlatView
385                     When  used  with the SizesbyAccount(*) will not group ac‐
386                     counts in a hierarchical level, but  print  each  account
387                     where jobs ran on a separate line without any hierarchy.
388
389              GID=<OPT>
390                     List of group ids to include in report.  Default is all.
391
392              Grouping=<OPT>
393                     Comma   separated   list   of   size  groupings.    (e.g.
394                     50,100,150  would  group  job  cpu  count  1-49,   50-99,
395                     100-149,  >  150).   grouping=individual will result in a
396                     single column for each job size found.
397
398              Jobs=<OPT>
399                     List of jobs/steps to include in report.  Default is all.
400
401              Nodes=<OPT>
402                     Only show jobs that ran on these nodes. Default is all.
403
404              Partitions=<OPT>
405                     List of partitions jobs ran on to include in report.  De‐
406                     fault is all.
407
408              PrintJobCount
409                     When used with the Sizes report will print number of jobs
410                     ran instead of time used.
411
412              Users=<OPT>
413                     List of users jobs to include in report.  Default is all.
414
415              Wckeys=<OPT>
416                     List of wckeys to use for the report.   Default  is  all.
417                     The  SizesbyWckey  report  all users summed together.  If
418                     you want only certain users specify them with the  Users=
419                     option.
420
421       OPTIONS SPECIFICALLY FOR RESERVATION REPORTS
422
423
424              Names=<OPT>
425                     List  of  reservations  to use for the report. Default is
426                     all.
427
428              Nodes=<OPT>
429                     Only show reservations that used these nodes. Default  is
430                     all.
431
432       OPTIONS SPECIFICALLY FOR USER REPORTS
433
434
435              Accounts=<OPT>
436                     List of accounts to use for the report. Default is all.
437
438              Group  Group  all accounts together for each user.  Default is a
439                     separate entry for each user and account reference.
440
441              TopCount=<OPT>
442                     Used in the TopUsage report.  Change the number of  users
443                     displayed.  Default is 10.
444
445              Users=<OPT>
446                     List of users jobs to include in report.  Default is all.
447

FORMAT OPTIONS FOR EACH REPORT

449       FORMAT OPTIONS FOR CLUSTER REPORTS
450
451              AccountUtilizationByUser
452                     Accounts, Cluster, Login, Proper, TresCount, Used
453
454              UserUtilizationByAccount
455                     Accounts, Cluster, Login, Proper, TresCount, Used
456
457              UserUtilizationByWckey
458                     Cluster, Login, Proper, TresCount, Used, Wckey
459
460              Utilization
461                     Allocated,  Cluster,  Down, Idle, OverCommitted, Planned‐
462                     Down, Reported, Planned, TresCount, TresName
463
464              WCKeyUtilizationByUser
465                     Cluster, Login, Proper, TresCount, Used, Wckey
466
467       FORMAT OPTIONS FOR JOB REPORTS
468
469
470              SizesByAccount
471                     Account, Cluster
472
473              SizesByAccountAndWckey
474                     Account, Cluster
475
476              SizesByWckey
477                     Wckey, Cluster
478
479       FORMAT OPTIONS FOR RESERVATION REPORTS
480
481
482              Utilization
483                     Allocated, Associations, Cluster, End, Flags, Idle, Name,
484                     Nodes,  ReservationId, Start, TotalTime, TresCount, Tres‐
485                     Name, TresTime
486
487       FORMAT OPTIONS FOR USER REPORTS
488
489
490              TopUsage
491                     Account, Cluster, Login, Proper, Used
492
493       All commands and options are case-insensitive.
494
495

PERFORMANCE

497       Executing sreport sends a remote procedure call to slurmdbd. If  enough
498       calls from sreport or other Slurm client commands that send remote pro‐
499       cedure calls to the slurmdbd daemon come in at once, it can result in a
500       degradation  of  performance of the slurmdbd daemon, possibly resulting
501       in a denial of service.
502
503       Do not run sreport or other Slurm client commands that send remote pro‐
504       cedure calls to slurmdbd from loops in shell scripts or other programs.
505       Ensure that programs limit calls to sreport to  the  minimum  necessary
506       for the information you are trying to gather.
507
508

ENVIRONMENT VARIABLES

510       Some  sreport options may be set via environment variables. These envi‐
511       ronment variables, along with their corresponding options,  are  listed
512       below.   (Note:  Command  line  options will always override these set‐
513       tings.)
514
515       SREPORT_CLUSTER     Same as -M, --cluster
516
517       SREPORT_FEDERATION  Same as --federation
518
519       SREPORT_LOCAL       Same as --local
520
521       SREPORT_TRES        Same as -t, --tres
522
523       SLURM_CONF          The location of the Slurm configuration file.
524
525

EXAMPLES

527       Report number of jobs per account according to different job size bins:
528
529              $ sreport job sizesbyaccount
530
531
532       Report cluster utilization:
533
534              $ sreport cluster utilization
535
536
537       Report top usage:
538
539              $ sreport user top
540
541
542       Report number of jobs by user gore1 within the environ account:
543
544              $ sreport job sizesbyaccount All_Clusters users=gore1 account=environ PrintJobCount
545
546
547       Report cluster account utilization with the specified fields during the
548       specified 24 hour day of February 23, 2009, by user gore1:
549
550              $ sreport cluster AccountUtilizationByUser cluster=zeus user=gore1 start=2/23/09 end=2/24/09 format=Accounts,Cluster,TresCount,Login,Proper,Used
551
552
553       Report cluster account utilization by user in the LC account on cluster
554       zeus:
555
556              $ sreport cluster AccountUtilizationByUser cluster=zeus accounts=lc start=2/23/09 end=2/24/09
557
558
559       Report top usage in percent of the  lc  account  during  the  specified
560       week:
561
562              $ sreport user topusage start=2/16/09 end=2/23/09 -t percent account=lc
563
564

COPYING

566       Copyright (C) 2009-2010 Lawrence Livermore National Security.  Produced
567       at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
568       Copyright (C) 2010-2022 SchedMD LLC.
569
570       This file is part of Slurm, a resource  management  program.   For  de‐
571       tails, see <https://slurm.schedmd.com/>.
572
573       Slurm  is free software; you can redistribute it and/or modify it under
574       the terms of the GNU General Public License as published  by  the  Free
575       Software  Foundation;  either version 2 of the License, or (at your op‐
576       tion) any later version.
577
578       Slurm is distributed in the hope that it will be  useful,  but  WITHOUT
579       ANY  WARRANTY;  without even the implied warranty of MERCHANTABILITY or
580       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General  Public  License
581       for more details.
582
583

SEE ALSO

585       sacct(1), slurmdbd(8)
586
587
588
589July 2021                       Slurm Commands                      sreport(1)
Impressum