1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801
|
.TH sreport "1" "Slurm Commands" "October 2022" "Slurm Commands"
.SH "NAME"
sreport \- Generate reports from the slurm accounting data.
.SH "SYNOPSIS"
\fBsreport\fR [\fIOPTIONS\fR...] [\fICOMMAND\fR...]
.SH "DESCRIPTION"
\fBsreport\fR is used to generate reports of job usage and cluster
utilization for Slurm jobs saved to the Slurm Database,
\fBslurmdbd\fR.
.SH "OPTIONS"
.TP
\fB\-a\fR, \fB\-\-all_clusters\fR
Use all clusters instead of only the cluster from which the command was
executed.
.IP
.TP
\fB\-M\fR, \fB\-\-cluster\fR
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.
.IP
.TP
\fB\-\-federation\fR
Generate a report for the federation if a member of one.
.IP
.TP
\fB\-h\fR, \fB\-\-help\fR
Print a help message describing the usage of \fBsreport\fR.
.IP
.TP
\fB\-\-local\fR
Generate a report for the local cluster, even if part of a federation.
Overrides \fB\-\-federation\fR.
.IP
.TP
\fB\-n\fR, \fB\-\-noheader\fR
Don't display header when listing results.
.IP
.TP
\fB\-p\fR, \fB\-\-parsable\fR
Output will be '|' delimited with a '|' at the end.
.IP
.TP
\fB\-P\fR, \fB\-\-parsable2\fR
Output will be '|' delimited without a '|' at the end.
.IP
.TP
\fB\-Q\fR, \fB\-\-quiet\fR
Print no warning or informational messages, only error messages.
.IP
.TP
\fB\-t\fR <\fItime_format\fR>
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 \fBtime\fP command
section below.
.IP
.TP
\fB\-T\fR, \fB\-\-tres\fR=<\fItres_names\fR>
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.
.IP
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Print detailed event logging.
.IP
.TP
\fB\-V\fR , \fB\-\-version\fR
Print version information and exit.
.IP
.SH "COMMANDS"
.LP
\<keyword\> may be omitted from the execute line and sreport will
execute in interactive mode. sreport will process commands as entered until
explicitly terminated.
.TP
\fBexit\fP
Terminate the execution of sreport.
Identical to the \fBquit\fR command.
.IP
.TP
\fBhelp\fP
Display a description of sreport options and commands.
.IP
.TP
\fBnonparsable\fP
Return output to normal after parsable or parsable2 has been set.
.IP
.TP
\fBparsable\fP
Output will be | delimited with an ending '|'.
.IP
.TP
\fBparsable2\fP
Output will be | delimited without an ending '|'.
.IP
.TP
\fBquiet\fP
Print no warning or informational messages, only fatal error messages.
.IP
.TP
\fBquit\fP
Terminate the execution of sreport.
Identical to the \fBexit\fR command.
.IP
.TP
\fBtime <time_format>\fP
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:
.IP
.RS
.TP 10
\fBSecPer\fR
Seconds/Percentage of Total
.IP
.TP
\fBMinPer\fR
Minutes/Percentage of Total
.IP
.TP
\fBHourPer\fR
Hours/Percentage of Total
.IP
.TP
\fBSeconds\fR
Seconds
.IP
.TP
\fBMinutes\fR
Minutes
.IP
.TP
\fBHours\fR
Hours
.IP
.TP
\fBPercent\fR
Percentage of Total
.RE
.IP
.TP
\fBverbose\fP
Enable detailed event logging.
.IP
.TP
\fBversion\fP
Display the sreport version number.
.IP
.TP
\fB!!\fP
Repeat the last command executed.
.IP
.SH "REPORT TYPES"
Valid report types are:
.RS
.TP
\fBcluster\fP \<REPORT\> \<OPTIONS\>
.IP
.TP
\fBjob\fP \<REPORT\> \<OPTIONS\>
.IP
.TP
\fBreservation\fP \<REPORT\> \<OPTIONS\>
.IP
.TP
\fBuser\fP \<REPORT\> \<OPTIONS\>
.IP
.RE
\<REPORT\> options for each type include:
.RS
.TP
\fBcluster\fR
AccountUtilizationByUser, UserUtilizationByAccount,
UserUtilizationByWckey, Utilization, WCKeyUtilizationByUser
.IP
.TP
\fBjob\fR
SizesByAccount, SizesByAccountAndWcKey, SizesByWckey
.IP
.TP
\fBreservation\fR
Utilization
.IP
.TP
\fBuser\fR
TopUsage
.IP
.RE
.LP
\fBNOTE\fR: If \fBOverSubscribe\fR is configured to \fBFORCE\fR or \fBYES\fR
in your slurm.conf and the system is not configured to use preemption
(\fBPreemptMode=OFF\fR) 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."
.SH "REPORT DESCRIPTION"
.TP
.B cluster AccountUtilizationByUser
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.
\fBNOTE\fR: 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.
.IP
.TP
.B cluster UserUtilizationByAccount
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.
.IP
.TP
.B cluster UserUtilizationByWCKey
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.
.IP
.TP
.B cluster Utilization
This report will display total usage divided amongst Allocated, Down,
Planned Down, Idle, and Planned time for selected clusters.
.RS
.IP Allocated 14
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.
.IP Down
Time that nodes were marked as Down or fully Drained, or time that slurmctld was
not responding (assuming TrackSlurmctldDown is set in slurmdbd.conf).
.IP Idle
Time that nodes were not Allocated, Down, PlannedDown, or Planned.
.IP OverCommitted
Time of eligible jobs waiting in the queue over the Planned time. Unlike
Planned, this has no limit. It is typically useful to determine whether your
system is overloaded and by how much.
.IP PlannedDown
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 state or
CLOUD nodes that were POWERED_DOWN.
.IP Planned
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. The maximum
time is limited to the amount of time possible on the system. If this value is
not of importance for you then the number can be grouped with idle time.
.IP TresCount
Configured number of TRES' on the reported nodes. See also the
\fBTresName\fP field.
.RE
.RS 7
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.
.RE
.RS
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 \fBFormat\fP option. The TresName will also be included if
using the \fB\-T, \-\-tres <tres_names>\fR option.
.RE
.IP
.TP
.B cluster WCKeyUtilizationByUser
This report will display wckey utilization sorted by WCKey name for
each user on each cluster.
.IP
.TP
.B job SizesByAccount
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.
.IP
.TP
.B job SizesByAccountAndWckey
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.
.IP
.TP
.B job SizesByWckey
This report will display the amount of time for each wckey for job ranges
specified by the 'grouping=' option.
.IP
.TP
.B reservation Utilization
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.
.IP
.TP
.B user TopUsage
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.
.IP
.LP
Each report type has various options...
.LP
.B OPTIONS FOR ALL REPORT TYPES
.RS
.TP
.B All_Clusters
Use all monitored clusters. Default is local cluster.
.IP
.TP
.B Clusters=<OPT>
List of clusters to include in report. Default is local cluster.
.IP
.TP
.B End=<OPT>
Period ending for report. Default is 23:59:59 of previous day.
Valid time formats are...
.sp
HH:MM[:SS] [AM|PM]
.br
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
.br
MM/DD[/YY]\-HH:MM[:SS]
.br
YYYY\-MM\-DD[THH:MM[:SS]]
.br
now[{+|\-}\fIcount\fR[seconds(default)|minutes|hours|days|weeks]]
.IP
.TP
.B Format=<OPT>
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.
.IP
.TP
.B Start=<OPT>
Period start for report. Default is 00:00:00 of previous day.
Valid time formats are...
.sp
HH:MM[:SS] [AM|PM]
.br
MMDD[YY] or MM/DD[/YY] or MM.DD[.YY]
.br
MM/DD[/YY]\-HH:MM[:SS]
.br
YYYY\-MM\-DD[THH:MM[:SS]]
.br
now[{+|\-}\fIcount\fR[seconds(default)|minutes|hours|days|weeks]]
.ad
.RE
.IP
.LP
.B OPTIONS SPECIFICALLY FOR CLUSTER REPORTS
.RS
.TP
.B Accounts=<OPT>
When used with the UserUtilizationByAccount, or
AccountUtilizationByUser, List of accounts to include in report.
Default is all.
.IP
.TP
.B Tree
When used with the AccountUtilizationByUser report will span the
accounts as they are in the hierarchy.
.IP
.TP
.B Users=<OPT>
When used with any report other than Utilization, List of users to
include in report. Default is all.
.IP
.TP
.B Wckeys=<OPT>
When used with the UserUtilizationByWckey or WCKeyUtilizationByUser,
List of wckeys to include in report. Default is all.
.RE
.IP
.LP
.B OPTIONS SPECIFICALLY FOR JOB REPORTS
.RS
.TP
.B 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 the FlatView or AcctAsParent
options.
.IP
.TP
.B AcctAsParent
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.
.IP
.TP
.B FlatView
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.
.IP
.TP
.B GID=<OPT>
List of group ids to include in report. Default is all.
.IP
.TP
.B Grouping=<OPT>
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.
.IP
.TP
.B Jobs=<OPT>
List of jobs/steps to include in report. Default is all.
.IP
.TP
.B Nodes=<OPT>
Only show jobs that ran on these nodes. Default is all.
.IP
.TP
.B Partitions=<OPT>
List of partitions jobs ran on to include in report. Default is all.
.IP
.TP
.B PrintJobCount
When used with the Sizes report will print number of jobs ran instead
of time used.
.IP
.TP
.B Users=<OPT>
List of users jobs to include in report. Default is all.
.IP
.TP
.B Wckeys=<OPT>
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.
.RE
.IP
.LP
.B OPTIONS SPECIFICALLY FOR RESERVATION REPORTS
.RS
.TP
.B Names=<OPT>
List of reservations to use for the report. Default is all.
.IP
.TP
.B Nodes=<OPT>
Only show reservations that used these nodes. Default is all.
.RE
.IP
.LP
.B OPTIONS SPECIFICALLY FOR USER REPORTS
.RS
.TP
.B Accounts=<OPT>
List of accounts to use for the report. Default is all.
.IP
.TP
.B Group
Group all accounts together for each user. Default is a separate
entry for each user and account reference.
.IP
.TP
.B TopCount=<OPT>
Used in the TopUsage report. Change the number of users displayed.
Default is 10.
.IP
.TP
.B Users=<OPT>
List of users jobs to include in report. Default is all.
.RE
.IP
.SH "FORMAT OPTIONS FOR EACH REPORT"
.LP
\fBFORMAT OPTIONS FOR CLUSTER REPORTS\fP
.RS
.TP
\fBAccountUtilizationByUser\fR
Accounts, Cluster, Login, Proper, TresCount, Used
.IP
.TP
\fBUserUtilizationByAccount\fR
Accounts, Cluster, Login, Proper, TresCount, Used
.IP
.TP
\fBUserUtilizationByWckey\fR
Cluster, Login, Proper, TresCount, Used, Wckey
.IP
.TP
\fBUtilization\fR
Allocated, Cluster, Down, Idle, OverCommitted, PlannedDown, Reported, Planned,
TresCount, TresName
.IP
.TP
\fBWCKeyUtilizationByUser\fR
Cluster, Login, Proper, TresCount, Used, Wckey
.IP
.RE
.LP
\fBFORMAT OPTIONS FOR JOB REPORTS\fP
.RS
.TP
\fBSizesByAccount\fR
Account, Cluster
.IP
.TP
\fBSizesByAccountAndWckey\fR
Account, Cluster
.IP
.TP
\fBSizesByWckey\fR
Wckey, Cluster
.IP
.RE
.LP
\fBFORMAT OPTIONS FOR RESERVATION REPORTS\fP
.RS
.TP
\fBUtilization\fR
Allocated, Associations, Cluster, End, Flags, Idle, Name, Nodes, ReservationId, Start, TotalTime, TresCount, TresName, TresTime
.IP
.RE
.LP
\fBFORMAT OPTIONS FOR USER REPORTS\fP
.RS
.TP
\fBTopUsage\fR
Account, Cluster, Login, Proper, Used
.IP
.RE
.LP
All commands and options are case\-insensitive.
.SH "PERFORMANCE"
.PP
Executing \fBsreport\fR sends a remote procedure call to \fBslurmdbd\fR. If
enough calls from \fBsreport\fR or other Slurm client commands that send remote
procedure calls to the \fBslurmdbd\fR daemon come in at once, it can result in a
degradation of performance of the \fBslurmdbd\fR daemon, possibly resulting in a
denial of service.
.PP
Do not run \fBsreport\fR or other Slurm client commands that send remote
procedure calls to \fBslurmdbd\fR from loops in shell scripts or other programs.
Ensure that programs limit calls to \fBsreport\fR to the minimum necessary for
the information you are trying to gather.
.SH "ENVIRONMENT VARIABLES"
.PP
Some \fBsreport\fR 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.)
.IP
.TP 20
\fBSREPORT_CLUSTER\fR
Same as \fB\-M\fR, \fB\-\-cluster\fR
.IP
.TP
\fBSREPORT_FEDERATION\fR
Same as \-\-federation\fR
.IP
.TP
\fBSREPORT_LOCAL\fR
Same as \-\-local\fR
.IP
.TP
\fBSREPORT_TRES\fR
Same as \fB\-t, \-\-tres\fR
.IP
.TP
\fBSLURM_CONF\fR
The location of the Slurm configuration file.
.in 0
.SH "EXAMPLES"
.TP
Report number of jobs per account according to different job size bins:
.IP
.nf
$ sreport job sizesbyaccount
.fi
.TP
Report cluster utilization:
.IP
.nf
$ sreport cluster utilization
.fi
.TP
Report top usage:
.IP
.nf
$ sreport user top
.fi
.TP
Report number of jobs by user gore1 within the environ account:
.IP
.nf
$ sreport job sizesbyaccount All_Clusters users=gore1 account=environ PrintJobCount
.fi
.TP
Report cluster account utilization with the specified fields during the \
specified 24 hour day of February 23, 2009, by user gore1:
.IP
.nf
$ sreport cluster AccountUtilizationByUser cluster=zeus user=gore1 \
start=2/23/09 end=2/24/09 format=Accounts,Cluster,TresCount,Login,Proper,Used
.fi
.TP
Report cluster account utilization by user in the LC account on cluster zeus:
.IP
.nf
$ sreport cluster AccountUtilizationByUser cluster=zeus accounts=lc \
start=2/23/09 end=2/24/09
.fi
.TP
Report top usage in percent of the lc account during the specified week:
.IP
.nf
$ sreport user topusage start=2/16/09 end=2/23/09 \-t percent account=lc
.fi
.SH "COPYING"
Copyright (C) 2009\-2010 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
.br
Copyright (C) 2010\-2022 SchedMD LLC.
.LP
This file is part of Slurm, a resource management program.
For details, see <https://slurm.schedmd.com/>.
.LP
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.
.LP
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.
.SH "SEE ALSO"
\fBsacct\fR(1), \fBslurmdbd\fR(8)
|