sreport(1)
โจ sreport(1) โจ
okay bestie, welcome to sreport โ straight out of the Slurm Commands manual, section 1, and it's honestly iconic. ๐
๐ธ NAME ๐ธ
sreport โ Generate reports from the slurm accounting data.
๐ฆ SYNOPSIS ๐ฆ
sreport [OPTIONS...] [COMMAND...]
๐ DESCRIPTION ๐
So basically sreport generates reports of job usage and cluster utilization for Slurm jobs that are saved to the Slurm Database, slurmdbd. ๐๏ธ
The report data comes from hourly, daily, and monthly rollups of accounting data that happen automatically in the background โ no cap, it just does that on its own. โจ
And here's the cute part: data gets pulled from the rollup table with the longest interval that can still satisfy the requested report period. So a report on the time range Start=01/01 End=03/01 can pull from the monthly rollup table, while a report with Start=01/01-03:00 End=03/01 needs to use the hourly rollup table. Smart, right? ๐
๐ OPTIONS ๐
-a,--all_clustersโ use all clusters instead of only the cluster from which the command was executed. going global fr fr ๐-M,--clusterโ the cluster(s) to generate reports for. Default is the local cluster โ unless the local cluster is currently part of a federation, in which case it generates 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 the report. Implies--local. โ--federationโ generate a report for the federation if a member of one. ๐ซถ-h,--helpโ print a help message describing the usage ofsreport.--localโ generate a report for the local cluster, even if part of a federation. Overrides--federation.-n,--noheaderโ don't display the header when listing results. minimal aesthetic ๐-p,--parsableโ output will be|delimited with a|at the end.-P,--parsable2โ output will be|delimited without a|at the end.-Q,--quietโ print no warning or informational messages, only error messages.-t <time_format>โ specify the output time format. Time format options are case insensitive and may be abbreviated. The default format isMinutes. Supported time format options are listed in thetimecommand section below. โฐ-T,--tres=<tres_names>โ 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 differentTRESBillingWeightsdefined, the Billing TRES for the node will be the highest of the partitions. IfTRESBillingWeightsis 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 that in most configurations multiple jobs are able to run on the same node โ which 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. ๐
- the
-v,--verboseโ print detailed event logging. give me all the tea ๐ต-V,--versionโ print version information and exit.
๐ง COMMANDS ๐ง
<keyword> may be omitted from the execute line, and then sreport will execute in interactive mode โ it'll process commands as entered until explicitly terminated. main character energy tbh ๐
exitโ terminate the execution ofsreport. Identical to thequitcommand.helpโ display a description ofsreportoptions and commands.nonparsableโ return output to normal afterparsableorparsable2has been set.parsableโ output will be|delimited with an ending|.parsable2โ output will be|delimited without an ending|.quietโ print no warning or informational messages, only fatal error messages.quitโ terminate the execution ofsreport. Identical to theexitcommand.time <time_format>โ specify the output time format. Time format options are case insensitive and may be abbreviated. The default format isMinutes. Supported time format options include:SecPerโ Seconds/Percentage of TotalMinPerโ Minutes/Percentage of TotalHourPerโ Hours/Percentage of TotalSecondsโ SecondsMinutesโ MinutesHoursโ HoursPercentโ Percentage of Total
verboseโ enable detailed event logging.versionโ display thesreportversion number.!!โ repeat the last command executed. literally the "same as last time" button ๐
๐ REPORT TYPES ๐
Valid report types are:
cluster <REPORT> <OPTIONS>
job <REPORT> <OPTIONS>
reservation <REPORT> <OPTIONS>
user <REPORT> <OPTIONS>
<REPORT> options for each type include:
clusterโAccountUtilizationByUser,AccountUtilizationByQOS,UserUtilizationByAccount,UserUtilizationByWckey,Utilization,WCKeyUtilizationByUserjobโSizesByAccount,SizesByAccountAndWcKey,SizesByWckeyreservationโUtilizationuserโTopUsage
NOTE: IfOverSubscribeis configured toFORCEorYESin yourslurm.confand 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 theslurmdbdlog stating:"We have more allocated time than is possible."๐ญ not the impossible time bestie
๐ REPORT DESCRIPTION ๐
๐ cluster AccountUtilizationByUser
This report displays 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.
NOTE: When an account is moved (renamed or re-parented), any associations that belonged to the old account retain the lineage they had at that time (see Lineage in sacctmgr(1)). Their usage therefore stays attributed to the accounts the user was under before the move. As a result, the account the user currently belongs to may show less usage than the sum of its user rows, and filtering the report on that account will omit that historical usage. ๐ฐ๏ธ history really said "i live here now"
๐ cluster AccountUtilizationByQOS
This report displays account utilization as it appears on the hierarchical tree. Starting with the root account by default, or with the specified account, this report will list the underlying usage in each account, with a sum on each level. Use the 'tree' option to expand the tree for better visibility. Users are not displayed here, only parent accounts. ๐ช
NOTE: Idle reservation time will be split evenly among accounts that have access to it. Since no QOS is directly connected with the idle time, the time is counted against the default QOS of the account, or 'normal' when there is no default.
NOTE: If you reroll data in the database and have changed the default QOS on an association to something other than what was there at the time of the original rollup, you can get different data. ๐ฌ yeah. that.
๐ cluster UserUtilizationByAccount
This report displays users by account in order of utilization without grouping multiple accounts by user into one โ instead it displays them on separate lines. ๐งพ
๐ cluster UserUtilizationByWCKey
This report displays users by wckey in order of utilization without grouping multiple wckey by user into one โ instead it displays them on separate lines.
๐ cluster Utilization
This report displays 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 theIGNORE_JOBSflag 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 theIGNORE_JOBSflag. ๐
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 likeOverCommittedandTresCountfields with theFormatoption. TheTresNamewill also be included if using the-T,--tres <tres_names>option. ๐ซ
๐ cluster WCKeyUtilizationByUser
This report displays wckey utilization sorted by WCKey name for each user on each cluster. ๐
๐ job SizesByAccount
This report displays 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. ๐ฒ
๐ job SizesByAccountAndWckey
This report is very similar to SizesByAccount โ the difference being each account is paired 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. ๐ซถ
๐ job SizesByWckey
This report displays the amount of time for each wckey for job ranges specified by the 'grouping=' option. โณ
reservation Utilization
Okay so this one shows you the total usage for reservations across the systems. ๐๏ธโจ Big note though: the time requests you put in here will not truncate the time the reservation actually used โ it only grabs reservations that ran at any point during the period you asked for. So like, if a res ran for 10 hours and you asked for 2, you still see all 10. No cap. ๐
user TopUsage
This one displays the top users on a cluster โ meaning the users with the highest usage. ๐ By default, users are sorted by CPUTime, but the -T, --tres option will sort users by the first TRES you specify. ๐ฅ
Use the group option to group accounts together. The default is to have a different line for each user-account combo. So yeah, one line per user + account unless you tell it otherwise. ๐ซถ
Each report type has various options...
OPTIONS FOR ALL REPORT TYPES
All_Clustersโ Use all monitored clusters. Default is the local cluster. ๐Clusters=<OPT>โ List of clusters to include in the report. Default is the local cluster. ๐๏ธEnd=<OPT>โ Period ending for the report. Default is23:59:59of the previous day. โฐ Note that while minutes and seconds are recognized, they will be rounded to the previous 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]]
Format=<OPT>โ Comma-separated list of fields to display in the report. ๐ When using the format option for listing various fields, you can put a%NUMBERafterwards 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. ๐
Start=<OPT>โ Period start for the report. Default is00:00:00of the previous day. โณ Note that while minutes and seconds are recognized, they will be rounded to the next 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
Accounts=<OPT>โ When used with theUserUtilizationByAccountorAccountUtilizationBy[User|QOS], list of accounts to include in the report. Default is all. ๐ฆTreeโ When used with theAccountUtilizationBy[User|QOS]report, will span the accounts as they are in the hierarchy. ๐ณUsers=<OPT>โ When used with any report other thanUtilization, list of users to include in the report. Default is all. ๐ฅWckeys=<OPT>โ When used with theUserUtilizationByWckeyorWCKeyUtilizationByUser, list of wckeys to include in the report. Default is all. ๐
OPTIONS SPECIFICALLY FOR JOB REPORTS
Accounts=<OPT>โ 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 theFlatVieworAcctAsParentoptions. ๐AcctAsParentโ When used with theSizesbyAccount(*), will take specified accounts as parents and the next layer of accounts under those specified will be displayed. Default isrootif no specificAccountsare requested. WhenFlatViewis used, this option is ignored. ๐จโ๐ฉโ๐งโ๐ฆFlatViewโ When used with theSizesbyAccount(*), will not group accounts in a hierarchical level, but print each account where jobs ran on a separate line without any hierarchy. ๐GID=<OPT>โ List of group ids to include in the report. Default is all. ๐Grouping=<OPT>โ Comma-separated list of size groupings. (e.g.50,100,150would group job cpu count1-49,50-99,100-149,> 150).grouping=individualwill result in a single column for each job size found. ๐Jobs=<OPT>โ List of jobs/steps to include in the report. Default is all. ๐ผNodes=<OPT>โ Only show jobs that ran on these nodes. Default is all. ๐ฅ๏ธPartitions=<OPT>โ List of partitions jobs ran on to include in the report. Default is all. ๐๏ธPrintJobCountโ When used with theSizesreport, will print number of jobs ran instead of time used. ๐ขUsers=<OPT>โ List of users jobs to include in the report. Default is all. ๐งโ๐ปWckeys=<OPT>โ List of wckeys to use for the report. Default is all. TheSizesbyWckeyreport all users summed together. If you want only certain users, specify them with theUsers=option. ๐๏ธ
OPTIONS SPECIFICALLY FOR RESERVATION REPORTS
Names=<OPT>โ List of reservations to use for the report. Default is all. ๐Nodes=<OPT>โ Only show reservations that used these nodes. Default is all. ๐ง
OPTIONS SPECIFICALLY FOR USER REPORTS
Accounts=<OPT>โ List of accounts to use for the report. Default is all. ๐งพGroupโ Group all accounts together for each user. Default is a separate entry for each user and account reference. ๐ซTopCount=<OPT>โ Used in theTopUsagereport. Change the number of users displayed. Default is10. ๐Users=<OPT>โ List of users jobs to include in the report. Default is all. ๐ฏ
FORMAT OPTIONS FOR EACH REPORT
FORMAT OPTIONS FOR CLUSTER REPORTS
AccountUtilizationByUserโAccounts,Cluster,Login,QOS,Proper,TresCount,UsedโจAccountUtilizationByQOSโAccounts,Cluster,QOS,TresCount,UsedโจUserUtilizationByAccountโAccounts,Cluster,Login,Proper,TresCount,UsedโจUserUtilizationByWckeyโCluster,Login,Proper,TresCount,Used,WckeyโจUtilizationโAllocated,Cluster,Down,Idle,OverCommitted,PlannedDown,Reported,Planned,TresCount,TresNameโจWCKeyUtilizationByUserโCluster,Login,Proper,TresCount,Used,Wckeyโจ
FORMAT OPTIONS FOR JOB REPORTS
SizesByAccountโAccount,ClusterโจSizesByAccountAndWckeyโAccount,ClusterโจSizesByWckeyโWckey,Clusterโจ
FORMAT OPTIONS FOR RESERVATION REPORTS
UtilizationโAllocated,Associations,Cluster,End,Flags,Idle,Name,Nodes,ReservationId,Start,TotalTime,TresCount,TresName,TresTimeโจ
FORMAT OPTIONS FOR USER REPORTS
TopUsageโAccount,Cluster,Login,Proper,Usedโจ
All commands and options are case-insensitive. ๐
EXPLANATION OF REPORT FIELDS
Accountโ Account name ๐Allocatedโ Cluster utilization report: Time that nodes were in use with active jobs or an active reservation. This does not include reservations created with theMAINTorIGNORE_JOBSflags. Reservation reports: Time that nodes were in use with active jobs in this reservation. โฑ๏ธAssociationsโ Associations allowed in the reservation ๐Clusterโ Cluster name ๐๏ธDownโ Cluster utilization report only: Time that nodes were marked asDownor fullyDrained, or time thatslurmctldwas not responding (ifTrackSlurmctldDownis set inslurmdbd.conf). ๐Endโ Reservation reports only: End time โฐEnergyโ Energy use (if tracking energy consumption) โกFlagsโ Reservation reports only: Flags applied to the reservation ๐ฉIdleโ Cluster utilization report: Time that nodes were notAllocated,Down,PlannedDown, orPlanned. Reservation reports: Time that nodes were notAllocated. ๐ดLoginโ User's login name ๐Nameโ Reservation reports only: Reservation name ๐ท๏ธOverCommittedโ Cluster utilization report only: Time of eligible jobs waiting in the queue over thePlannedtime. This contains any overflow ofPlannedtime that would otherwise exceed theReportedtime. It is typically useful to determine whether your system is overloaded and by how much. ๐จPlannedโ Cluster utilization report only: Time that nodes were notAllocated,DownorPlannedDownwith eligible jobs in the queue that were unable to start due to time or size constraints. IfAllocatedplusPlannedtime exceeds theReportedtime, the excess will be reported asOverCommitted. If this value is not of importance for you then the number can be grouped with idle time. ๐๏ธPlannedDownโ Cluster utilization report only: Time that nodes were in use by a reservation created with theMAINTflag but not theIGNORE_JOBSflag. Also, time that nodes were in theFUTUREorPOWERED_DOWNstate. ๐Proper Nameโ User's proper/real name ๐ชชReportedโ 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%. ๐ReservationIdโ Reservation reports only: Reservation ID ๐Startโ Reservation reports only: Start time ๐ฆTotalTimeโ Reservation reports only: Amount of time the reservation was valid โณTresCountโ Number of TRES present ๐ขTresNameโ Name of TRES reported ๐ท๏ธTresTimeโ Reservation reports only: Total TRES-time in the reservation โฑ๏ธUsedโ Used TRES-minutes ๐Wckeyโ Workload Characterization Key ๐
๐ฅ PERFORMANCE ๐ฅ
Okay bestie, listen up, because this one's important. Every time you run sreport, it sends a remote procedure call to slurmdbd. And 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. ๐ญ So like, don't do that.
Do not runsreportor other Slurm client commands that send remote procedure calls toslurmdbdfrom loops in shell scripts or other programs. Like, seriously, not the vibe. Ensure that programs limit calls tosreportto the minimum necessary for the information you are trying to gather. ๐ซถ
๐ธ ENVIRONMENT VARIABLES ๐ธ
Some sreport options may be set via environment variables, which is honestly so convenient of them. These environment variables, along with their corresponding options, are listed below. (Note: Command line options will always override these settings โ the CLI is the main character here, no cap.)
SREPORT_CLUSTERโ Same as-M,--clusterSREPORT_FEDERATIONโ Same as--federationSREPORT_LOCALโ Same as--localSREPORT_TRESโ Same as-t,--tresSLURM_CONFโ The location of the Slurm configuration file.
โจ EXAMPLES โจ
Okay this is the fun part, let me show you the receipts ๐
Report number of jobs per account according to different job size bins
$ 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%
Report cluster utilization
$ 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
Report top usage
$ 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
Report jobs by size from specific user and account
$ 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%
Report cluster account utilization with the specified fields, during the 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
Report cluster account utilization by user for a specific account, during a 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
Report top usage in percent for a specific account
$ 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%
๐ COPYING ๐
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.
๐ฆ SEE ALSO ๐ฆ
Okay that's the whole page bestie, you ate that ๐
โจ Slurm 26.05, from the Slurm Commands collection, the one and only sreport(1). Go forth and report responsibly, and please, for the love of everything, don't put it in a while loop ๐๐
๐ฆ where this page comes from
- arch rolling: slurm-llnl 26.05.5.1-1 ยท GPL-2.0-or-later
- epel 10: slurm 26.05.5-1.el10_3 ยท GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- nixpkgs unstable: slurm 26-05-5-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms