Mock RPC for unit tests
[ganeti-local] / man / gnt-job.rst
1 gnt-job(8) Ganeti | Version @GANETI_VERSION@
2 ============================================
3
4 Name
5 ----
6
7 gnt-job - Job commands
8
9 Synopsis
10 --------
11
12 **gnt-job** {command} [arguments...]
13
14 DESCRIPTION
15 -----------
16
17 The **gnt-job** is used for examining and manipulating the job
18 queue.
19
20 COMMANDS
21 --------
22
23 ARCHIVE
24 ~~~~~~~
25
26 **archive** {id...}
27
28 This command can be used to archive job by their IDs. Only jobs
29 that have finished execution (i.e either *success*, *error* or
30 *canceled* jobs).
31
32 AUTOARCHIVE
33 ~~~~~~~~~~~
34
35 **autoarchive** {*age* | ``all``}
36
37 Archive jobs by their age. This command can archive jobs older than
38 *age* seconds, or alternatively all finished jobs can be archived
39 if the string all is passed.
40
41 CANCEL
42 ~~~~~~
43
44 | **cancel**
45 | {[\--force] {\--pending | \--queued | \--waiting} |
46 |  *job-id* ...}
47
48 Cancel the job(s) identified by the given *job id*. Only jobs that have
49 not yet started to run can be canceled; that is, jobs in either the
50 *queued* or *waiting* state. To skip a confirmation, pass ``--force``.
51 ``--queued`` and ``waiting`` can be used to cancel all jobs in the
52 respective state, ``--pending`` includes both.
53
54 CHANGE-PRIORITY
55 ~~~~~~~~~~~~~~~
56
57 | **change-priority** \--priority {low | normal | high}
58 | {[\--force] {\--pending | \--queued | \--waiting} |
59 |  *job-id* ...}
60
61 Changes the priority of one or multiple pending jobs. Jobs currently
62 running have only the priority of remaining opcodes changed.
63 ``--priority`` must be specified. ``--queued`` and ``waiting`` can be
64 used to re-prioritize all jobs in the respective state, ``--pending``
65 includes both. To skip a confirmation, pass ``--force``.
66
67 INFO
68 ~~~~
69
70 **info** {*id*...}
71
72 Show detailed information about the given job id(s). If no job id
73 is given, all jobs are examined (warning, this is a lot of
74 information).
75
76 LIST
77 ~~~~
78
79 | **list** [\--no-headers] [\--separator=*SEPARATOR*]
80 | [-o *[+]FIELD,...*] [\--filter] [job-id...]
81
82 Lists the jobs and their status. By default, the job id, job
83 status, and a small job description is listed, but additional
84 parameters can be selected.
85
86 The ``--no-headers`` option will skip the initial header line. The
87 ``--separator`` option takes an argument which denotes what will be
88 used between the output fields. Both these options are to help
89 scripting.
90
91 The ``-o`` option takes a comma-separated list of output fields.
92 The available fields and their meaning are:
93
94 @QUERY_FIELDS_JOB@
95
96 If the value of the option starts with the character ``+``, the new
97 fields will be added to the default list. This allows one to quickly
98 see the default list plus a few other fields, instead of retyping
99 the entire list of fields.
100
101 To include archived jobs in the list the ``--archived`` option can be
102 used.
103
104 The following options can be used to show only specific jobs:
105
106 ``--pending``
107   Show only jobs pending execution.
108 ``--running``
109   Show jobs currently running only.
110 ``--error``
111   Show failed jobs only.
112 ``--finished``
113   Show finished jobs only.
114
115 If exactly one argument is given and it appears to be a query filter
116 (see **ganeti**\(7)), the query result is filtered accordingly. For
117 ambiguous cases (e.g. a single field name as a filter) the ``--filter``
118 (``-F``) option forces the argument to be treated as a filter.
119
120
121 LIST-FIELDS
122 ~~~~~~~~~~~
123
124 **list-fields** [field...]
125
126 Lists available fields for jobs.
127
128
129 WAIT
130 ~~~~~
131
132 **wait** {id}
133
134 Wait for the job by the given *id* to finish; do not produce
135 any output.
136
137 WATCH
138 ~~~~~
139
140 **watch** {id}
141
142 This command follows the output of the job by the given *id* and
143 prints it.
144
145 .. vim: set textwidth=72 :
146 .. Local Variables:
147 .. mode: rst
148 .. fill-column: 72
149 .. End: