Move gnt-job to ganeti.client.gnt_job
[ganeti-local] / man / gnt-debug.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!-- Please adjust the date whenever revising the manpage. -->
5   <!ENTITY dhdate      "<date>June 08, 2010</date>">
6   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
7        allowed: see man(7), man(1). -->
8   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
9   <!ENTITY dhucpackage "<refentrytitle>gnt-debug</refentrytitle>">
10   <!ENTITY dhpackage   "gnt-debug">
11
12   <!ENTITY debian      "<productname>Debian</productname>">
13   <!ENTITY gnu         "<acronym>GNU</acronym>">
14   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
15   <!ENTITY footer SYSTEM "footer.sgml">
16 ]>
17
18 <refentry>
19   <refentryinfo>
20     <copyright>
21       <year>2006</year>
22       <year>2007</year>
23       <year>2008</year>
24       <year>2009</year>
25       <year>2010</year>
26       <holder>Google Inc.</holder>
27     </copyright>
28     &dhdate;
29   </refentryinfo>
30   <refmeta>
31     &dhucpackage;
32
33     &dhsection;
34     <refmiscinfo>Ganeti 2.2</refmiscinfo>
35   </refmeta>
36   <refnamediv>
37     <refname>&dhpackage;</refname>
38
39     <refpurpose>Debug commands</refpurpose>
40   </refnamediv>
41   <refsynopsisdiv>
42     <cmdsynopsis>
43       <command>&dhpackage; </command>
44
45       <arg choice="req">command</arg>
46       <arg>arguments...</arg>
47     </cmdsynopsis>
48   </refsynopsisdiv>
49   <refsect1>
50     <title>DESCRIPTION</title>
51
52     <para>
53       The <command>&dhpackage;</command> is used for debugging the
54       Ganeti system.
55     </para>
56
57   </refsect1>
58   <refsect1>
59     <title>COMMANDS</title>
60
61     <refsect2>
62       <title>ALLOCATOR</title>
63
64       <cmdsynopsis>
65         <command>allocator</command>
66         <arg>--debug</arg>
67         <arg>--dir <replaceable>DIRECTION</replaceable></arg>
68         <arg choice="req">--algorithm <replaceable>ALLOCATOR</replaceable>
69         </arg>
70         <arg>--mode <replaceable>MODE</replaceable></arg>
71         <arg>--mem <replaceable>MEMORY</replaceable></arg>
72         <arg>--disks <replaceable>DISKS</replaceable></arg>
73         <arg>--disk-template <replaceable>TEMPLATE</replaceable></arg>
74         <arg>--nics <replaceable>NICS</replaceable></arg>
75         <arg>--os-type <replaceable>OS</replaceable></arg>
76         <arg>--vcpus <replaceable>VCPUS</replaceable></arg>
77         <arg>--tags <replaceable>TAGS</replaceable></arg>
78         <arg choice="req"><replaceable>instance</replaceable></arg>
79       </cmdsynopsis>
80
81       <para>
82         Executes a test run of the <emphasis>iallocator</emphasis> framework.
83       </para>
84
85       <para>
86         The command will build input for a given iallocator script
87         (named with the <option>--algorithm</option> option), and
88         either show this input data (if
89         <replaceable>DIRECTION</replaceable> is
90         <emphasis>in</emphasis>) or run the iallocator script and show
91         its output (if <replaceable>DIRECTION</replaceable> is
92         <emphasis>out</emphasis>).
93       </para>
94
95       <para>
96         If the <replaceable>MODE</replaceable> is
97         <emphasis>allocate</emphasis>, then an instance definition is
98         built from the other arguments and sent to the script,
99         otherwise (<replaceable>MODE</replaceable> is
100         <emphasis>relocate</emphasis>) an existing instance name must
101         be passed as the first argument.
102       </para>
103
104       <para>
105         This build of Ganeti will look for iallocator scripts in the
106         following directories: <filename
107         class="directory">@CUSTOM_IALLOCATOR_SEARCH_PATH@</filename>;
108         for more details about this framework, see the HTML or PDF
109         documentation.
110       </para>
111     </refsect2>
112
113     <refsect2>
114       <title>DELAY</title>
115
116       <cmdsynopsis>
117         <command>delay</command>
118         <arg>--debug</arg>
119         <arg>--no-master</arg>
120         <arg choice="opt" rep="repeat">-n <replaceable>NODE</replaceable></arg>
121         <arg choice="req"><replaceable>duration</replaceable></arg>
122       </cmdsynopsis>
123
124       <para>
125         Run a test opcode (a sleep) on the master and on selected nodes
126         (via an RPC call). This serves no other purpose but to execute a
127         test operation.
128       </para>
129
130       <para>
131         The <option>-n</option> option can be given multiple times to
132         select the nodes for the RPC call. By default, the delay will
133         also be executed on the master, unless the
134         <option>--no-master</option> option is passed.
135       </para>
136
137       <para>
138         The <replaceable>delay</replaceable> argument will be
139         interpreted as a floating point number.
140       </para>
141
142     </refsect2>
143
144     <refsect2>
145       <title>SUBMIT-JOB</title>
146
147       <cmdsynopsis>
148         <command>submit-job</command>
149         <arg choice="opt">--verbose</arg>
150         <arg choice="opt">--timing-stats</arg>
151         <arg choice="opt">--job-repeat <option>N</option></arg>
152         <arg choice="opt">--op-repeat <option>N</option></arg>
153         <arg choice="req" rep="repeat">opcodes_file</arg>
154       </cmdsynopsis>
155
156       <para>
157         This command builds a list of opcodes from files in JSON format
158         and submits a job per file to the master daemon. It can be used
159         to test options that are not available via command line.
160       </para>
161
162       <para>
163         The <option>verbose</option> option will additionally display
164         the corresponding job IDs and the progress in waiting for the
165         jobs; the <option>timing-stats</option> option will show some
166         overall statistics inluding the number of total opcodes, jobs
167         submitted and time spent in each stage (submit, exec, total).
168       </para>
169
170       <para>
171         The <option>job-repeat</option> and <option>op-repeat</option>
172         options allow to submit multiple copies of the passed arguments;
173         job-repeat will cause N copies of each job (input file) to be
174         submitted (equivalent to passing the arguments N times) while
175         op-repeat will cause N copies of each of the opcodes in the file
176         to be executed (equivalent to each file containing N copies of
177         the opcodes).
178       </para>
179
180     </refsect2>
181
182     <refsect2>
183       <title>TEST-JOBQUEUE</title>
184
185       <cmdsynopsis>
186         <command>test-jobqueue</command>
187       </cmdsynopsis>
188
189       <para>
190         Executes a few tests on the job queue. This command might generate
191         failed jobs deliberately.
192       </para>
193     </refsect2>
194
195     <refsect2>
196       <title>LOCKS</title>
197       <cmdsynopsis>
198         <command>locks</command>
199         <arg>--no-headers</arg>
200         <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
201         <sbr>
202         <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
203         <arg>--interval=<replaceable>SECONDS</replaceable></arg>
204         <sbr>
205       </cmdsynopsis>
206
207       <para>
208         Shows a list of locks in the master daemon.
209       </para>
210
211       <para>
212         The <option>--no-headers</option> option will skip the initial
213         header line. The <option>--separator</option> option takes an
214         argument which denotes what will be used between the output
215         fields. Both these options are to help scripting.
216       </para>
217
218       <para>
219         The <option>-o</option> option takes a comma-separated list of
220         output fields. The available fields and their meaning are:
221         <variablelist>
222           <varlistentry>
223             <term>name</term>
224             <listitem>
225               <simpara>Lock name</simpara>
226             </listitem>
227           </varlistentry>
228           <varlistentry>
229             <term>mode</term>
230             <listitem>
231               <simpara>
232                 Mode in which the lock is currently acquired (exclusive or
233                 shared)
234               </simpara>
235             </listitem>
236           </varlistentry>
237           <varlistentry>
238             <term>owner</term>
239             <listitem>
240               <simpara>Current lock owner(s)</simpara>
241             </listitem>
242           </varlistentry>
243           <varlistentry>
244             <term>pending</term>
245             <listitem>
246               <simpara>Threads waiting for the lock</simpara>
247             </listitem>
248           </varlistentry>
249         </variablelist>
250       </para>
251
252       <para>
253         If the value of the option starts with the character
254         <constant>+</constant>, the new fields will be added to the default
255         list. This allows to quickly see the default list plus a few other
256         fields, instead of retyping the entire list of fields.
257       </para>
258
259       <para>
260         Use <option>--interval</option> to repeat the listing. A delay
261         specified by the option value in seconds is inserted.
262       </para>
263
264     </refsect2>
265   </refsect1>
266
267   &footer;
268
269 </refentry>
270
271 <!-- Keep this comment at the end of the file
272 Local variables:
273 mode: sgml
274 sgml-omittag:t
275 sgml-shorttag:t
276 sgml-minimize-attributes:nil
277 sgml-always-quote-attributes:t
278 sgml-indent-step:2
279 sgml-indent-data:t
280 sgml-parent-document:nil
281 sgml-default-dtd-file:nil
282 sgml-exposed-tags:nil
283 sgml-local-catalogs:nil
284 sgml-local-ecat-files:nil
285 End:
286 -->