File: condor_watch_q.rst

package info (click to toggle)
condor 23.9.6%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 60,012 kB
  • sloc: cpp: 528,272; perl: 87,066; python: 42,650; ansic: 29,558; sh: 11,271; javascript: 3,479; ada: 2,319; java: 619; makefile: 615; xml: 613; awk: 268; yacc: 78; fortran: 54; csh: 24
file content (236 lines) | stat: -rw-r--r-- 6,877 bytes parent folder | download
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
.. _condor_watch_q:

*condor_watch_q*
======================

Track the status of jobs over time.

:index:`condor_watch_q<single: condor_watch_q; HTCondor commands>`
:index:`condor_watch_q command`

Synopsis
--------

**condor_watch_q** [**-help**]

**condor_watch_q** [*general options*] [*display options*] [*behavior options*] [*tracking options*]


Description
-----------

**condor_watch_q** is a tool for tracking the status of jobs over time
without repeatedly querying the *condor_schedd*. It does this by reading
job event log files.
These files may be specified directly (the ``-files`` option),
or indirectly via a single query to the *condor_schedd* when **condor_watch_q**
starts up (options like ``-users`` or ``-clusters``).

**condor_watch_q** provides a variety of
options for output formatting, including: colorized output, tabular information,
progress bars, and text summaries. These display options are highly-customizable
via command line options.

**condor_watch_q** also provides a minimal language for exiting when
certain conditions are met by the tracked jobs. For example, it can be
configured to exit when all of the tracked jobs have terminated.

Examples
--------

If no users, cluster ids, or event logs are given, **condor_watch_q** will
default to tracking all of the current user's jobs. Thus, with no arguments,

.. code-block:: bash

    condor_watch_q

will track all of your currently-active clusters.

To track jobs from a specific cluster,
use the ``-clusters`` option, passing the cluster ID:

.. code-block:: bash

    condor_watch_q -clusters 12345

To track jobs from a specific user,
use the ``-users`` option, passing the user's name
the actual query will be the for the :ad-attr:`Owner` job ad attribute):

.. code-block:: bash

    condor_watch_q -users jane

To track jobs from a specific event log file,
use the ``-files`` option, passing the path to the event log:

.. code-block:: bash

    condor_watch_q -users /home/jane/events.log

To track jobs from a specific batch,
use the ``-batches`` option, passing the batch name:

.. code-block:: bash

    condor_watch_q -batches BatchOfJobsFromTuesday

All of the above "tracking" options can be used together, and multiple values
may be passed to each one. For example, to track all of the jobs that are:
owned by ``jane`` or ``jim``, in cluster ``12345``,
or in the event log ``/home/jill/events.log``, run

.. code-block:: bash

    condor_watch_q -users jane jim -clusters 12345 -files /home/jill/events.log

By default, **condor_watch_q** will never exit on its own
(unless it encounters an error or it is not tracking any jobs).
You can tell it to exit when certain conditions are met. For example,
to exit with status 0 when all of the jobs it is tracking are done
or with status 1 when any job is held, you could run

.. code-block:: bash

    condor_watch_q -exit all,done,0 -exit any,held,1


Options
-------

General Options
'''''''''''''''

 **-help**
    Display the help message and exit.

 **-debug**
    Causes debugging information to be sent to ``stderr``.


Tracking Options
''''''''''''''''

These options control which jobs **condor_watch_q** will track,
and how it discovers them.

 **-users USER [USER ...]**
    Choose which users to track jobs for.
    All of the user's jobs will be tracked.
    One or more user names may be passed.

 **-clusters CLUSTER_ID [CLUSTER_ID ...]**
    Which cluster IDs to track jobs for.
    One or more cluster ids may be passed.

 **-larger-than CLUSTER_ID**
    Track jobs for all cluster IDs greater than
    or equal to the specified *CLUSTER_ID*.
    Note: This option does not discover how to track jobs.

 **-files FILE [FILE ...]**
    Which job event log files (i.e., the ``log`` file from ``condor_submit``)
    to track jobs from.
    One or more file paths may be passed.

 **-batches BATCH_NAME [BATCH_NAME ...]**
    Which job batch names to track jobs for.
    One or more batch names may be passed.

 **-collector COLLECTOR**
    Which collector to contact to find the schedd, if needed.
    Defaults to the local collector.

 **-schedd SCHEDD**
    Which schedd to contact for queries, if needed.
    Defaults to the local schedd.


Behavior Options
''''''''''''''''

 **-exit GROUPER,JOB_STATUS[,EXIT_STATUS]**
    Specify conditions under which condor_watch_q should exit.
    ``GROUPER`` is one of ``all``, ``any`` or ``none``.
    ``JOB_STATUS`` is one of ``active``, ``done``, ``idle``, or ``held``.
    The "active" status means "in the queue",
    and includes jobs in the idle, running, and held states.
    ``EXIT_STATUS`` may be any valid exit status integer.
    To specify multiple exit conditions, pass this option multiple times.
    **condor_watch_q** will exit when any of the conditions are satisfied.


Display Options
'''''''''''''''

These options control how **condor_watch_q** formats its output.
Many of them are "toggles": ``-x`` enables option "x", and ``-no-x`` disables it.

 **-groupby {batch, log, cluster}**
    How to group jobs into rows for display in the table.
    Must be one of
    ``batch`` (group by job batch name),
    ``log`` (group by event log file path),
    or
    ``cluster`` (group by cluster ID).
    Defaults to ``batch``.

 **-table/-no-table**
    Enable/disable the table.
    Enabled by default.

 **-progress/-no-progress**
    Enable/disable the progress bar.
    Enabled by default.

 **-row-progress/-no-row-progress**
    Enable/disable the progress bar for each row.
    Enabled by default.

 **-summary/-no-summary**
    Enable/disable the summary line.
    Enabled by default.

 **-summary-type {totals, percentages}**
    Choose what to display on the summary line,
    ``totals`` (the number of each jobs in each state),
    or
    ``percentages`` (the percentage of jobs in each state, of the total number of tracked jobs)
    By default, show ``totals``.

 **-updated-at/-no-updated-at**
    Enable/disable the "updated at" line.
    Enabled by default.

 **-abbreviate/-no-abbreviate**
    Enable/disable abbreviating path components to the shortest somewhat-unique prefix.
    Disabled by default.

 **-color/-no-color**
    Enable/disable colored output.
    Enabled by default if connected to a tty.
    Disabled on Windows if colorama is not available (https://pypi.org/project/colorama/).

 **-refresh/-no-refresh**
    Enable/disable refreshing output.
    If refreshing is disabled, output will be appended instead.
    Enabled by default if connected to a tty.


Exit Status
-----------

Returns ``0`` when sent a SIGINT (keyboard interrupt).

Returns ``0`` if no jobs are found to track.

Returns ``1`` for fatal internal errors.

Can be configured via the ``-exit`` option to return any valid exit status when
a certain condition is met.

Author
------

Center for High Throughput Computing, University of Wisconsin-Madison