gnt-job.rst 2.71 KB
Newer Older
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
gnt-job(8) Ganeti | Version @GANETI_VERSION@
============================================

Name
----

gnt-job - Job commands

Synopsis
--------

**gnt-job** {command} [arguments...]

DESCRIPTION
-----------

The **gnt-job** is used for examining and manipulating the job
queue.

COMMANDS
--------

ARCHIVE
~~~~~~~

**archive** {id...}

This command can be used to archive job by their IDs. Only jobs
that have finished execution (i.e either *success*, *error* or
*canceled* jobs).

AUTOARCHIVE
~~~~~~~~~~~

**autoarchive** {*age* | ``all``}

Archive jobs by their age. This command can archive jobs older than
*age* seconds, or alternatively all finished jobs can be archived
if the string all is passed.

CANCEL
~~~~~~

**cancel** {*id*}

Cancel the job identified by the given *id*. Only jobs that have
not yet started to run can be canceled; that is, jobs in either the
*queued* or *waiting* state.

INFO
~~~~

**info** {*id*...}

Show detailed information about the given job id(s). If no job id
is given, all jobs are examined (warning, this is a lot of
information).

LIST
~~~~

62
**list** [\--no-headers] [\--separator=*SEPARATOR*]
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
[-o *[+]FIELD,...*]

Lists the jobs and their status. By default, the job id, job
status, and a small job description is listed, but additional
parameters can be selected.

The ``--no-headers`` option will skip the initial header line. The
``--separator`` option takes an argument which denotes what will be
used between the output fields. Both these options are to help
scripting.

The ``-o`` option takes a comma-separated list of output fields.
The available fields and their meaning are:



id
    the job id

status
    the status of the job

priority
    current priority of the job

received_ts
    the timestamp the job was received

start_ts
    the timestamp when the job was started

end_ts
    the timestamp when the job was ended

summary
    a summary of the opcodes that define the job

ops
    the list of opcodes defining the job

opresult
    the list of opcode results

opstatus
    the list of opcode statuses

oplog
    the list of opcode logs

opstart
    the list of opcode start times (before acquiring locks)

opexec
    the list of opcode execution start times (after acquiring any
    necessary locks)

opend
    the list of opcode end times

oppriority
    the priority of each opcode


If the value of the option starts with the character ``+``, the new
Iustin Pop's avatar
Iustin Pop committed
127
fields will be added to the default list. This allows one to quickly
128
129
130
131
132
133
134
135
136
137
see the default list plus a few other fields, instead of retyping
the entire list of fields.

WATCH
~~~~~

**watch** {id}

This command follows the output of the job by the given *id* and
prints it.
138
139
140
141
142
143

.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: