gnt-debug.sgml 8.62 KB
Newer Older
1 2 3 4
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [

  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  <!-- Please adjust the date whenever revising the manpage. -->
5
  <!ENTITY dhdate      "<date>June 08, 2010</date>">
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
       allowed: see man(7), man(1). -->
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
  <!ENTITY dhucpackage "<refentrytitle>gnt-debug</refentrytitle>">
  <!ENTITY dhpackage   "gnt-debug">

  <!ENTITY debian      "<productname>Debian</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
  <!ENTITY footer SYSTEM "footer.sgml">
]>

<refentry>
  <refentryinfo>
    <copyright>
      <year>2006</year>
      <year>2007</year>
      <year>2008</year>
      <year>2009</year>
25
      <year>2010</year>
26 27 28 29 30 31 32 33
      <holder>Google Inc.</holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
    &dhucpackage;

    &dhsection;
34
    <refmiscinfo>Ganeti 2.2</refmiscinfo>
35 36 37 38
  </refmeta>
  <refnamediv>
    <refname>&dhpackage;</refname>

39
    <refpurpose>Debug commands</refpurpose>
40 41 42 43 44 45 46 47 48 49 50 51 52 53
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage; </command>

      <arg choice="req">command</arg>
      <arg>arguments...</arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para>
      The <command>&dhpackage;</command> is used for debugging the
54
      Ganeti system.
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
    </para>

  </refsect1>
  <refsect1>
    <title>COMMANDS</title>

    <refsect2>
      <title>ALLOCATOR</title>

      <cmdsynopsis>
        <command>allocator</command>
        <arg>--debug</arg>
        <arg>--dir <replaceable>DIRECTION</replaceable></arg>
        <arg choice="req">--algorithm <replaceable>ALLOCATOR</replaceable>
        </arg>
        <arg>--mode <replaceable>MODE</replaceable></arg>
        <arg>--mem <replaceable>MEMORY</replaceable></arg>
        <arg>--disks <replaceable>DISKS</replaceable></arg>
        <arg>--disk-template <replaceable>TEMPLATE</replaceable></arg>
        <arg>--nics <replaceable>NICS</replaceable></arg>
        <arg>--os-type <replaceable>OS</replaceable></arg>
        <arg>--vcpus <replaceable>VCPUS</replaceable></arg>
        <arg>--tags <replaceable>TAGS</replaceable></arg>
        <arg choice="req"><replaceable>instance</replaceable></arg>
      </cmdsynopsis>

      <para>
        Executes a test run of the <emphasis>iallocator</emphasis> framework.
      </para>

      <para>
        The command will build input for a given iallocator script
        (named with the <option>--algorithm</option> option), and
        either show this input data (if
        <replaceable>DIRECTION</replaceable> is
        <emphasis>in</emphasis>) or run the iallocator script and show
        its output (if <replaceable>DIRECTION</replaceable> is
        <emphasis>out</emphasis>).
      </para>

      <para>
        If the <replaceable>MODE</replaceable> is
        <emphasis>allocate</emphasis>, then an instance definition is
        built from the other arguments and sent to the script,
        otherwise (<replaceable>MODE</replaceable> is
        <emphasis>relocate</emphasis>) an existing instance name must
        be passed as the first argument.
      </para>

      <para>
105
        This build of Ganeti will look for iallocator scripts in the
106 107 108 109 110
        following directories: <filename
        class="directory">@CUSTOM_IALLOCATOR_SEARCH_PATH@</filename>;
        for more details about this framework, see the HTML or PDF
        documentation.
      </para>
111
    </refsect2>
112 113 114 115 116 117 118 119 120 121 122 123 124

    <refsect2>
      <title>DELAY</title>

      <cmdsynopsis>
        <command>delay</command>
        <arg>--debug</arg>
        <arg>--no-master</arg>
        <arg choice="opt" rep="repeat">-n <replaceable>NODE</replaceable></arg>
        <arg choice="req"><replaceable>duration</replaceable></arg>
      </cmdsynopsis>

      <para>
125 126 127
        Run a test opcode (a sleep) on the master and on selected nodes
        (via an RPC call). This serves no other purpose but to execute a
        test operation.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
      </para>

      <para>
        The <option>-n</option> option can be given multiple times to
        select the nodes for the RPC call. By default, the delay will
        also be executed on the master, unless the
        <option>--no-master</option> option is passed.
      </para>

      <para>
        The <replaceable>delay</replaceable> argument will be
        interpreted as a floating point number.
      </para>

    </refsect2>

    <refsect2>
      <title>SUBMIT-JOB</title>

      <cmdsynopsis>
        <command>submit-job</command>
149 150 151 152
        <arg choice="opt">--verbose</arg>
        <arg choice="opt">--timing-stats</arg>
        <arg choice="opt">--job-repeat <option>N</option></arg>
        <arg choice="opt">--op-repeat <option>N</option></arg>
153
        <arg choice="req" rep="repeat">opcodes_file</arg>
154 155 156
      </cmdsynopsis>

      <para>
157 158 159
        This command builds a list of opcodes from files in JSON format
        and submits a job per file to the master daemon. It can be used
        to test options that are not available via command line.
160 161
      </para>

162
      <para>
163 164 165 166 167
        The <option>verbose</option> option will additionally display
        the corresponding job IDs and the progress in waiting for the
        jobs; the <option>timing-stats</option> option will show some
        overall statistics inluding the number of total opcodes, jobs
        submitted and time spent in each stage (submit, exec, total).
168 169 170 171
      </para>

      <para>
        The <option>job-repeat</option> and <option>op-repeat</option>
172 173 174 175 176 177
        options allow to submit multiple copies of the passed arguments;
        job-repeat will cause N copies of each job (input file) to be
        submitted (equivalent to passing the arguments N times) while
        op-repeat will cause N copies of each of the opcodes in the file
        to be executed (equivalent to each file containing N copies of
        the opcodes).
178 179
      </para>

180 181
    </refsect2>

182 183 184 185 186 187 188 189 190 191 192 193 194
    <refsect2>
      <title>TEST-JOBQUEUE</title>

      <cmdsynopsis>
        <command>test-jobqueue</command>
      </cmdsynopsis>

      <para>
        Executes a few tests on the job queue. This command might generate
        failed jobs deliberately.
      </para>
    </refsect2>

Michael Hanselmann's avatar
Michael Hanselmann committed
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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
    <refsect2>
      <title>LOCKS</title>
      <cmdsynopsis>
        <command>locks</command>
        <arg>--no-headers</arg>
        <arg>--separator=<replaceable>SEPARATOR</replaceable></arg>
        <sbr>
        <arg>-o <replaceable>[+]FIELD,...</replaceable></arg>
        <arg>--interval=<replaceable>SECONDS</replaceable></arg>
        <sbr>
      </cmdsynopsis>

      <para>
        Shows a list of locks in the master daemon.
      </para>

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

      <para>
        The <option>-o</option> option takes a comma-separated list of
        output fields. The available fields and their meaning are:
        <variablelist>
          <varlistentry>
            <term>name</term>
            <listitem>
              <simpara>Lock name</simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>mode</term>
            <listitem>
              <simpara>
                Mode in which the lock is currently acquired (exclusive or
                shared)
              </simpara>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>owner</term>
            <listitem>
              <simpara>Current lock owner(s)</simpara>
            </listitem>
          </varlistentry>
        </variablelist>
      </para>

      <para>
        If the value of the option starts with the character
        <constant>+</constant>, the new fields will be added to the default
        list. This allows to quickly see the default list plus a few other
        fields, instead of retyping the entire list of fields.
      </para>

      <para>
        Use <option>--interval</option> to repeat the listing. A delay
        specified by the option value in seconds is inserted.
      </para>

    </refsect2>
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
  </refsect1>

  &footer;

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->