Skip to content

Commit

Permalink
doc: add queue support with stats in flux-jobs(1)
Browse files Browse the repository at this point in the history
Problem: flux-jobs can output stats of a specific queue, but that fact
is not documented in the manpage.

Document that --queue can be used with --stats and --stats-only.
  • Loading branch information
chu11 committed Oct 29, 2022
1 parent 278ca18 commit 828782f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions doc/man1/flux-jobs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,27 @@ OPTIONS
Defaults to *auto*.

**--stats**
Output a summary of global job statistics before the header.
May be useful in conjunction with utilities like
:linux:man1:`watch`, e.g.::
Output a summary of job statistics before the header. By default
shows global statistics. If ``--queue`` is specified, shows
statistics for the specified queue. May be useful in conjunction
with utilities like :linux:man1:`watch`, e.g.::

$ watch -n 2 flux jobs --stats -f running -c 25

will display a summary of global statistics along with the top 25
will display a summary of statistics along with the top 25
running jobs, updated every 2 seconds.

**--stats-only**
Output a summary of global job statistics and exit.
``flux jobs`` will exit with non-zero exit status with ``--stats-only``
if there are no active jobs. This allows the following loop to work::
Output a summary of job statistics and exit. By default shows
global statistics. If ``--queue`` is specified, shows statistics
for the specified queue. ``flux jobs`` will exit with non-zero
exit status with ``--stats-only`` if there are no active jobs. This
allows the following loop to work::

$ while flux jobs --stats-only; do sleep 2; done

All other options are ignored when ``--stats-only`` is used.
All options other than ``--queue`` are ignored when
``--stats-only`` is used.

**-R, --recursive**
List jobs recursively. Each child job which is also an instance of
Expand Down

0 comments on commit 828782f

Please sign in to comment.