sreport(1) Slurm Commands sreport(1)

sreport - Generate reports from the slurm accounting data.

sreport [OPTIONS...] [COMMAND...]

sreport is used to generate reports of job usage and cluster utilization for Slurm jobs saved to the Slurm Database, slurmdbd.

Use all clusters instead of only the cluster from which the command was executed.
The cluster(s) to generate reports for. Default is local cluster, unless the local cluster is currently part of a federation and in that case generate a report for all clusters in the current federation. If the clusters included in a federation vary through time, use this option to identify the clusters to be included in report. Implies --local.
Generate a report for the federation if a member of one.
Print a help message describing the usage of sreport.
Generate a report for the local cluster, even if part of a federation. Overrides --federation.
Don't display header when listing results.
Output will be '|' delimited with a '|' at the end.
Output will be '|' delimited without a '|' at the end.
Print no warning or informational messages, only error messages.
Specify the output time format. Time format options are case insensitive and may be abbreviated. The default format is Minutes. Supported time format options are listed in the time command section below.
Trackable resource (TRES) to report values for. By default CPU resource use is reported (except for reservation reports. All TRES types reserved by a reservation will be shown by default unless overridden with this option). Multiple TRES names may be separated using a comma separated list for all reports except the job reports, which can only support a single TRES name, or "ALL" for all TRES.

The "Reported" Billing TRES is calculated from the largest Billing TRES of each node multiplied by the time frame. For example, if a node is part of multiple partitions and each has a different TRESBillingWeights defined the Billing TRES for the node will be the highest of the partitions. If TRESBillingWeights is not defined on any partition for a node then the Billing TRES will be equal to the number of CPUs on the node.

TRES node usage is no longer reported in percent format or in Cluster Utilization. Please use TRES CPU instead. The main issue with using node is in most configurations multiple jobs are able to run on the same node. This makes TRES node accounting count the same node multiple times in the same period. In exclusive node configurations, CPU accounting returns the same usage node accounting would.

Print detailed event logging.
Print version information and exit.

<keyword> may be omitted from the execute line and sreport will execute in interactive mode. sreport will process commands as entered until explicitly terminated.

Terminate the execution of sreport. Identical to the quit command.
Display a description of sreport options and commands.
Return output to normal after parsable or parsable2 has been set.
Output will be | delimited with an ending '|'.
Output will be | delimited without an ending '|'.
Print no warning or informational messages, only fatal error messages.
Terminate the execution of sreport. Identical to the exit command.
Specify the output time format. Time format options are case insensitive and may be abbreviated. The default format is Minutes. Supported time format options include:
Seconds/Percentage of Total
Minutes/Percentage of Total
Hours/Percentage of Total
Seconds
Minutes
Hours
Percentage of Total
Enable detailed event logging.
Display the sreport version number.
!!
Repeat the last command executed.

Valid report types are:

<REPORT> options for each type include:

AccountUtilizationByUser, UserUtilizationByAccount, UserUtilizationByWckey, Utilization, WCKeyUtilizationByUser
SizesByAccount, SizesByAccountAndWcKey, SizesByWckey
Utilization
TopUsage

NOTE: If OverSubscribe is configured to FORCE or YES in your slurm.conf and the system is not configured to use preemption (PreemptMode=OFF) accounting can easily grow to values greater than the actual utilization. It may be common on such systems to get error messages in the slurmdbd log stating: "We have more allocated time than is possible."

This report will display account utilization as it appears on the hierarchical tree. Starting with the specified account or the root account by default this report will list the underlying usage with a sum on each level. Use the 'tree' option to span the tree for better visibility.

NOTE: Idle reservation time will be split evenly among accounts/users given access to it. When a reservation is assigned to whole accounts, the time will be counted in the association for the accounts, not the user associations in the accounts. In this case, the usage of a parent account can be larger than the sum of its children.

This report will display users by account in order of utilization without grouping multiple accounts by user into one, but displaying them on separate lines.
This report will display users by wckey in order of utilization without grouping multiple wckey by user into one, but displaying them on separate lines.
This report will display total usage divided amongst Allocated, Down, Planned Down, Idle, and Planned time for selected clusters.

Refer to the later section for descriptions of these fields.

Note: Reservations created with the IGNORE_JOBS flag are not tracked in the Cluster Utilization report due to the fact that allowing any current/active jobs to continue to run in the reservation introduces the possibility for them to be accounted for incorrectly. The jobs in these reservations will be tracked as normal rather than being bundled in the reservation time, as they are with reservations that do not have the IGNORE_JOBS flag.

Note: The default view for the "Cluster Utilization" report includes the following fields: Cluster, Allocated, Down, PlannedDown, Idle, Planned, Reported. You can include additional fields like OverCommitted and TresCount fields with the Format option. The TresName will also be included if using the -T, --tres <tres_names> option.


This report will display wckey utilization sorted by WCKey name for each user on each cluster.
This report will display the amount of time used for job ranges specified by the 'grouping=' option. Only a single level in the tree is displayed defaulting to the root dir. If you specify other accounts with the 'account=' option sreport will use those accounts as the root account and you will receive the aggregated totals of each listed account plus their sub accounts.
This report is very similar to SizesByAccount with the difference being each account is pair with wckeys so the identifier is account:wckey instead of just account so there will most likely be multiple accounts listed depending on the number of wckeys used.
This report will display the amount of time for each wckey for job ranges specified by the 'grouping=' option.
This report will display total usage for reservations on the systems. Note: Time requests on this report will not truncate the time the reservation used, only the reservations that ran at any time during the period requested.
Displays the top users on a cluster, i.e. users with the highest usage. By default users are sorted by CPUTime, but the -T, --tres option will sort users by the first TRES specified.

Use the group option to group accounts together. The default is to have a different line for each user account combination.

Each report type has various options...

OPTIONS FOR ALL REPORT TYPES

Use all monitored clusters. Default is local cluster.
List of clusters to include in report. Default is local cluster.
Period ending for report. Default is 23:59:59 of previous day. Note that while minutes and seconds are recognized, they will be rounded to the nearest hour as reports cannot be generated for a more specific time range. Valid time formats are...

HH:MM[:SS] [AM|PM]
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
MM/DD[/YY]-HH:MM[:SS]
YYYY-MM-DD[THH:MM[:SS]]
now[{+|-}count[seconds(default)|minutes|hours|days|weeks]]

Comma separated list of fields to display in report.

When using the format option for listing various fields you can put a %NUMBER afterwards to specify how many characters should be printed.

e.g. format=name%30 will print 30 characters of field name right justified. A -30 will print 30 characters left justified.

Period start for report. Default is 00:00:00 of previous day. Note that while minutes and seconds are recognized, they will be rounded to the nearest hour as reports cannot be generated for a more specific time range. Valid time formats are...

HH:MM[:SS] [AM|PM]
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
MM/DD[/YY]-HH:MM[:SS]
YYYY-MM-DD[THH:MM[:SS]]
now[{+|-}count[seconds(default)|minutes|hours|days|weeks]]

OPTIONS SPECIFICALLY FOR CLUSTER REPORTS

When used with the UserUtilizationByAccount, or AccountUtilizationByUser, List of accounts to include in report. Default is all.
When used with the AccountUtilizationByUser report will span the accounts as they are in the hierarchy.
When used with any report other than Utilization, List of users to include in report. Default is all.
When used with the UserUtilizationByWckey or WCKeyUtilizationByUser, List of wckeys to include in report. Default is all.

OPTIONS SPECIFICALLY FOR JOB REPORTS

List of accounts to use for the report. Default is all which will show only one line corresponding to the totals of all accounts in the hierarchy. This explanation does not apply when ran with the FlatView or AcctAsParent options.
When used with the SizesbyAccount(*) will take specified accounts as parents and the next layer of accounts under those specified will be displayed. Default is root if no specific Accounts are requested. When FlatView is used, this option is ignored.
When used with the SizesbyAccount(*) will not group accounts in a hierarchical level, but print each account where jobs ran on a separate line without any hierarchy.
List of group ids to include in report. Default is all.
Comma separated list of size groupings. (e.g. 50,100,150 would group job cpu count 1-49, 50-99, 100-149, > 150). grouping=individual will result in a single column for each job size found.
List of jobs/steps to include in report. Default is all.
Only show jobs that ran on these nodes. Default is all.
List of partitions jobs ran on to include in report. Default is all.
When used with the Sizes report will print number of jobs ran instead of time used.
List of users jobs to include in report. Default is all.
List of wckeys to use for the report. Default is all. The SizesbyWckey report all users summed together. If you want only certain users specify them with the Users= option.

OPTIONS SPECIFICALLY FOR RESERVATION REPORTS

List of reservations to use for the report. Default is all.
Only show reservations that used these nodes. Default is all.

OPTIONS SPECIFICALLY FOR USER REPORTS

List of accounts to use for the report. Default is all.
Group all accounts together for each user. Default is a separate entry for each user and account reference.
Used in the TopUsage report. Change the number of users displayed. Default is 10.
List of users jobs to include in report. Default is all.

FORMAT OPTIONS FOR CLUSTER REPORTS

Accounts, Cluster, Login, Proper, TresCount, Used
Accounts, Cluster, Login, Proper, TresCount, Used
Cluster, Login, Proper, TresCount, Used, Wckey
Allocated, Cluster, Down, Idle, OverCommitted, PlannedDown, Reported, Planned, TresCount, TresName
Cluster, Login, Proper, TresCount, Used, Wckey

FORMAT OPTIONS FOR JOB REPORTS

Account, Cluster
Account, Cluster
Wckey, Cluster

FORMAT OPTIONS FOR RESERVATION REPORTS

Allocated, Associations, Cluster, End, Flags, Idle, Name, Nodes, ReservationId, Start, TotalTime, TresCount, TresName, TresTime

FORMAT OPTIONS FOR USER REPORTS

Account, Cluster, Login, Proper, Used

All commands and options are case-insensitive.

Account name
Cluster utilization report: Time that nodes were in use with active jobs or an active reservation. This does not include reservations created with the MAINT or IGNORE_JOBS flags.

Reservation reports: Time that nodes were in use with active jobs in this reservation

Associations allowed in the reservation
Cluster name
Cluster utilization report only: Time that nodes were marked as Down or fully Drained, or time that slurmctld was not responding (if TrackSlurmctldDown is set in slurmdbd.conf)
Reservation reports only: End time
Energy use (if tracking energy consumption)
Reservation reports only: Flags applied to the reservation
Cluster utilization report: Time that nodes were not Allocated, Down, PlannedDown, or Planned

Reservation reports: Time that nodes were not Allocated

User's login name
Reservation reports only: Reservation name
Cluster utilization report only: Time of eligible jobs waiting in the queue over the Planned time. This contains any overflow of Planned time that would otherwise exceed the Reported time. It is typically useful to determine whether your system is overloaded and by how much.
Cluster utilization report only: Time that nodes were not Allocated, Down or PlannedDown with eligible jobs in the queue that were unable to start due to time or size constraints. If Allocated plus Planned time exceeds the Reported time, the excess will be reported as OverCommitted. If this value is not of importance for you then the number can be grouped with idle time.
Cluster utilization report only: Time that nodes were in use by a reservation created with the MAINT flag but not the IGNORE_JOBS flag. Also, time that nodes were in the FUTURE or POWERED_DOWN state.
User's proper/real name
Cluster utilization report only: Total time that records are available for. Nodes that were added to or removed from the cluster during the report period will only contribute usage data for the time they were present in the cluster and cause percentage calculations to deviate from 100%.
Reservation reports only: Reservation ID
Reservation reports only: Start time
Reservation reports only: Amount of time the reservation was valid
Number of TRES present
Name of TRES reported
Reservation reports only: Total TRES-time in the reservation
Used TRES-minutes
Workload Characterization Key

Executing sreport sends a remote procedure call to slurmdbd. If enough calls from sreport or other Slurm client commands that send remote procedure calls to the slurmdbd daemon come in at once, it can result in a degradation of performance of the slurmdbd daemon, possibly resulting in a denial of service.

Do not run sreport or other Slurm client commands that send remote procedure calls to slurmdbd from loops in shell scripts or other programs. Ensure that programs limit calls to sreport to the minimum necessary for the information you are trying to gather.

Some sreport options may be set via environment variables. These environment variables, along with their corresponding options, are listed below. (Note: Command line options will always override these settings.)

Same as -M, --cluster
Same as --federation
Same as --local
Same as -t, --tres
The location of the Slurm configuration file.


$ sreport job sizesbyaccount Start=11:00
--------------------------------------------------------------------------------
Job Sizes 2024-08-19T11:00:00 - 2024-08-19T11:59:59 (3600 secs)
Time reported in Minutes
--------------------------------------------------------------------------------
  Cluster   Account     0-49 CPUs   50-249 CPUs  250-499 CPUs  500-999 CPUs  >= 1000 CPUs % of cluster
--------- --------- ------------- ------------- ------------- ------------- ------------- ------------
minesofm+      root           770             0             0             0             0      100.00%
$ sreport cluster utilization Start=11:00
--------------------------------------------------------------------------------
Cluster Utilization 2024-08-19T11:00:00 - 2024-08-19T11:59:59
Usage reported in CPU Minutes
--------------------------------------------------------------------------------
  Cluster Allocate     Down  Planned     Idle  Planned Reported
--------- -------- -------- -------- -------- -------- --------
minesofm+      770      120      239     3791      239     4920
$ sreport user top Start=11:00
--------------------------------------------------------------------------------
Top 10 Users 2024-08-19T11:00:00 - 2024-08-19T11:59:59 (3600 secs)
Usage reported in CPU Minutes
--------------------------------------------------------------------------------
  Cluster     Login     Proper Name         Account     Used   Energy
--------- --------- --------------- --------------- -------- --------
minesofm+   stephen             ,,,            main      538        0
minesofm+   phteven             ,,,            main      145        0
minesofm+   phteven             ,,,       rivendell       45        0
minesofm+   stephen             ,,,       rivendell       41        0
$ sreport job sizesbyaccount All_Clusters users=stephen account=main PrintJobCount Start=11:00
--------------------------------------------------------------------------------
Job Sizes 2024-08-19T11:00:00 - 2024-08-19T11:59:59 (3600 secs)
Units are in number of jobs ran
--------------------------------------------------------------------------------
  Cluster   Account     0-49 CPUs   50-249 CPUs  250-499 CPUs  500-999 CPUs  >= 1000 CPUs % of cluster
--------- --------- ------------- ------------- ------------- ------------- ------------- ------------
minesofm+      main            12             0             0             0             0      100.00%
specified day and by the specified user:
$ sreport cluster AccountUtilizationByUser start=7/10 end=7/11 cluster=minesofmoria user=stephen format=Account,Cluster,TresCount,Login,Proper,Used
--------------------------------------------------------------------------------
Cluster/Account/User Utilization 2024-07-10T00:00:00 - 2024-07-10T23:59:59 (86400 secs)
Usage reported in CPU Minutes
--------------------------------------------------------------------------------
        Account   Cluster TRES Count     Login     Proper Name     Used
--------------- --------- ---------- --------- --------------- --------
           main minesofm+              stephen             ,,,       38
      rivendell minesofm+              stephen             ,,,        1
          arwen minesofm+              stephen             ,,,        1
         elrond minesofm+              stephen             ,,,        1
1-week period:
$ sreport cluster AccountUtilizationByUser start=7/23 end=7/24 cluster=minesofmoria account=main
--------------------------------------------------------------------------------
Cluster/Account/User Utilization 2024-07-23T00:00:00 - 2024-07-23T23:59:59 (86400 secs)
Usage reported in CPU Minutes
--------------------------------------------------------------------------------
  Cluster         Account     Login     Proper Name     Used   Energy
--------- --------------- --------- --------------- -------- --------
minesofm+            main                                148        0
minesofm+            main   phteven             ,,,        2        0
minesofm+            main   stephen             ,,,      146        0
$ sreport user topusage start=11:00 -t percent account=main
--------------------------------------------------------------------------------
Top 10 Users 2024-08-19T11:00:00 - 2024-08-19T11:59:59 (3600 secs)
Usage reported in Percentage of Total
--------------------------------------------------------------------------------
  Cluster     Login     Proper Name         Account     Used   Energy
--------- --------- --------------- --------------- -------- --------
minesofm+   stephen             ,,,            main   10.94%    0.00%
minesofm+   phteven             ,,,            main    2.95%    0.00%

Copyright (C) 2009-2010 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
Copyright (C) 2010-2022 SchedMD LLC.

This file is part of Slurm, a resource management program. For details, see https://slurm.schedmd.com/.

Slurm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Slurm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

sacct(1), slurmdbd(8)

Slurm Commands August 2024