.SH "DESCRIPTION"
\fBsprio\fR is used to view the components of a job's scheduling
priority when the multi-factor priority plugin is installed.
\fBsprio\fR is a read-only utility that extracts information from the
multi-factor priority plugin.  By default, \fBsprio\fR returns
information for all pending jobs.  Options exist to display specific
jobs by job ID and user name.

.SH "OPTIONS"

.TP
\fB\-\-federation\fR
Show jobs in federation if a member of one.

.TP
\fB\-h\fR, \fB\-\-noheader\fR
Do not print a header on the output.

.TP
\fB\-\-help\fR
Print a help message describing all options \fBsprio\fR.

.TP
\fB\-j <job_id_list>\fR, \fB\-\-jobs=<job_id_list>\fR
Requests a comma separated list of job ids to display.  Defaults to
all jobs. Since this option's argument is optional, for proper parsing
the single letter option must be followed immediately with the value
and not include a space between them. For example "\-j1008,1009" and
not "\-j 1008,1009".

.TP
\fB\-\-local\fR
Show only jobs local to this cluster. Ignore other clusters in this federation
(if any). Overrides \-\-federation.

.TP
\fB\-l\fR, \fB\-\-long\fR
Report more of the available information for the selected jobs.

.TP
\fB\-M\fR, \fB\-\-clusters\fR=<\fIstring\fR>
The cluster to issue commands to. Only one cluster name may be specified.
Note that the SlurmDBD must be up for this option to work properly.
This option implicitly sets the \fB\-\-local\fR option.

.TP
\fB\-n\fR, \fB\-\-norm\fR
Display the normalized priority factors for the selected jobs.

.TP
\fB\-o <output_format>\fR, \fB\-\-format=<output_format>\fR
The format of each field is "%[.][size]type".
.RS
.TP 8
\fIsize\fR
is the minimum field size.
If no size is specified, whatever is needed to print the information will be used.
.TP
\fI .\fR
indicates the output should be left justified.
By default, output is right justified.
.RE

.IP
Valid \fItype\fR specifications include:

.RS
.TP 4
\fB%a\fR
Normalized age priority
.TP
\fB%A\fR
Weighted age priority
.TP
\fB%b\fR
Normalized association priority
.TP
\fB%B\fR
Weighted association priority
.TP
\fB%c\fR
Cluster name. Only applicable for federated clusters
.TP
\fB%f\fR
Normalized fair-share priority
.TP
\fB%F\fR
Weighted fair-share priority
.TP
\fB%i\fR
Job ID
.TP
\fB%j\fR
Normalized job size priority
.TP
\fB%J\fR
Weighted job size priority
.TP
\fB%N\fR
Nice adjustment
.TP
\fB%p\fR
Normalized partition priority
Weighted admin priority.
.TP
\fB%t\fR
Normalized TRES priorities
.TP
\fB%T\fR
Weighted TRES priorities
.TP
\fB%u\fR
User name for a job
.TP
\fB%Y\fR
Job priority
.TP
\fB%y\fR
Normalized job priority
.RE

.TP
\fB-S <sort_list>\fR, \fB--sort=<sort_list>\fR
Specification of the order in which jobs should be reported. This uses the same
field specification as <output_format>. Multiple sorts may be performed by
listing multiple sort fields separated by commas. The field specifications may
be preceded by "+" or "\-" for ascending (default) or descending respectively.
For example, a <sort_list> of "u,r,\-y" will sort the job priority reports by
username, partition name, and descending job priority, in that order. The
default <sort_list> is "i" (ascending job id).

.TP
\fB\-p <partition_list>\fR, \fB\-\-partition=<partition_list>\fR
Requests a comma separated list of partitions to display.  Defaults to
all partitions.

.TP
\fB\-\-sibling\fR
Show all sibling jobs on a federated cluster. Without this option in a
federated cluster, each job in each partition will have its priority and its
components reported for only one cluster. Each sibling job on the various
clusters in the federation may have different priority, which will not be
reported without using this option. Implicitly adds "%c" (cluster name) to the
output format.

.TP
\fB\-u <user_list>\fR, \fB\-\-user=<user_list>\fR
Request jobs from a comma separated list of users.  The list can
consist of user names or user id numbers.

.TP
\fB\-\-usage\fR
Print a brief help message listing the \fBsprio\fR options.

.TP
If no corresponding commandline option is specified, \fBsprio\fR will use the value of
the following environment variables.
.TP 20
\fBSLURM_CLUSTERS\fR
Same as \fB\-\-clusters\fR

.TP
\fBSLURM_CONF\fR
The location of the Slurm configuration file.

.TP
\fBSPRIO_FEDERATION\fR
Same as \fB\-\-federation\fR

.TP
\fBSPRIO_FORMAT\fR
Same as \fB\-o <output_format>, \-\-format=<output_format>\fR

.TP
\fBSPRIO_LOCAL\fR
Same as \fB\-\-local\fR

.TP
\fBSPRIO_SIBLING\fR
Same as \fB\-\-sibling\fR

.SH "EXAMPLES"
.eo
Print the list of all pending jobs with their weighted priorities
.br
> sprio
.br
  JOBID   PRIORITY        AGE  FAIRSHARE    JOBSIZE  PARTITION        QOS
.br
  65539      62664          0      51664       1000      10000          0
.br
  65540      62663          0      51663       1000      10000          0
.br
  65541      62662          0      51662       1000      10000          0
.ec

.eo
Print the list of all pending jobs with their normalized priorities
.br
> sprio -n
.br
  JOBID PRIORITY   AGE        FAIRSHARE  JOBSIZE    PARTITION  QOS
.br
  65539 0.00001459 0.0007180  0.5166470  1.0000000  1.0000000  0.0000000
.br
  65540 0.00001459 0.0007180  0.5166370  1.0000000  1.0000000  0.0000000
.br

.eo
Print the job priorities for jobs of specific users
.br
> sprio --users=fred,sally
.br
  JOBID     USER  PRIORITY       AGE  FAIRSHARE   JOBSIZE  PARTITION     QOS
.br
  65548     fred     62079         1      51077      1000      10000       0
.br
  65549    sally     62080         1      51078      1000      10000       0
.ec

.eo
Print the configured weights for each priority component
.br
> sprio -w
.br
  JOBID   PRIORITY        AGE  FAIRSHARE    JOBSIZE  PARTITION        QOS
.br
  Weights                1000     100000       1000      10000          1
.ec

.SH "COPYING"
Copyright (C) 2009 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
.br
Copyright (C) 2010\-2017 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"
\fBsqueue\fR(1), \fBsshare\fR(1)

Man(1) output converted with man2html