summaryrefslogtreecommitdiff
path: root/doc/dbus-test-tool.1.xml.in
blob: 091dee143698521fdcf0107e31d4d1c294807387 (plain)
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry id="dbus-test-tool.1">
  <refentryinfo>
    <copyright>
      <year>2015</year>
      <holder>Collabora Ltd.</holder>
    </copyright>
    <legalnotice>
      <para>This man page is distributed under the same terms as
        dbus-test-tool (GPL-2+). There is NO WARRANTY, to the extent
        permitted by law.</para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>dbus-test-tool</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="manual">User Commands</refmiscinfo>
    <refmiscinfo class="source">D-Bus</refmiscinfo>
    <refmiscinfo class="version">@DBUS_VERSION@</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>dbus-test-tool</refname>
    <refpurpose>D-Bus traffic generator and test tool</refpurpose>
  </refnamediv>

  <refsynopsisdiv id="synopsis">
    <cmdsynopsis>
      <command>dbus-test-tool</command>
      <arg choice="plain">black-hole</arg>
      <group choice="opt">
        <arg choice="plain">--session</arg>
        <arg choice="plain">--system</arg>
      </group>
      <arg choice="opt">--name=<replaceable>NAME</replaceable></arg>
      <arg choice="opt">--no-read</arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>dbus-test-tool</command>
      <arg choice="plain">echo</arg>
      <group choice="opt">
        <arg choice="plain">--session</arg>
        <arg choice="plain">--system</arg>
      </group>
      <arg choice="opt">--name=<replaceable>NAME</replaceable></arg>
      <arg choice="opt">--sleep=<replaceable>MS</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>dbus-test-tool</command>
      <arg choice="plain">spam</arg>
      <group choice="opt">
        <arg choice="plain">--session</arg>
        <arg choice="plain">--system</arg>
      </group>
      <arg choice="opt">--dest=<replaceable>NAME</replaceable></arg>
      <arg choice="opt">--count=<replaceable>N</replaceable></arg>
      <arg choice="opt">--flood</arg>
      <arg choice="opt">--ignore-errors</arg>
      <arg choice="opt">--messages-per-conn=<replaceable>N</replaceable></arg>
      <arg choice="opt">--no-reply</arg>
      <arg choice="opt">--queue=<replaceable>N</replaceable></arg>
      <arg choice="opt">--seed=<replaceable>SEED</replaceable></arg>
      <group choice="opt">
        <arg choice="plain">--string</arg>
        <arg choice="plain">--bytes</arg>
        <arg choice="plain">--empty</arg>
      </group>
      <group choice="opt">
        <arg choice="plain">--payload=<replaceable>S</replaceable></arg>
        <arg choice="plain">--stdin</arg>
        <arg choice="plain">--message-stdin</arg>
        <arg choice="plain">--random-size</arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="description">
    <title>DESCRIPTION</title>
    <para><command>dbus-test-tool</command> is a multi-purpose tool
      for debugging and profiling D-Bus.</para>

    <para><command>dbus-test-tool black-hole</command>
      connects to D-Bus, optionally requests a name, then does not
      reply to messages. It normally reads and discards messages from
      its D-Bus socket, but can be configured to sleep forever without
      reading.</para>

    <para><command>dbus-test-tool echo</command>
      connects to D-Bus, optionally requests a name, then sends back an
      empty reply to every method call, after an optional delay.</para>

    <para><command>dbus-test-tool spam</command>
      connects to D-Bus and makes repeated method calls,
      normally named <literal>com.example.Spam</literal>.</para>
  </refsect1>

  <refsect1 id="options">
    <title>OPTIONS</title>
    <refsect2>
      <title>Common options</title>
      <variablelist remap="TP">

        <varlistentry>
          <term><option>--session</option></term>
          <listitem>
            <para>Connect to the session bus. This is the default.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--system</option></term>
          <listitem>
            <para>Connect to the system bus.</para>
          </listitem>
        </varlistentry>

      </variablelist>
    </refsect2>

    <refsect2>
      <title>black-hole mode</title>
      <variablelist remap="TP">

        <varlistentry>
          <term><option>--name=</option><replaceable>NAME</replaceable></term>
          <listitem>
            <para>Before proceeding, request ownership of the well-known
              bus name <replaceable>NAME</replaceable>, for example
              <literal>com.example.NoReply</literal>. By default,
              no name is requested, and the tool can only be addressed by
              a unique bus name such as <literal>:1.23</literal>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--no-read</option></term>
          <listitem>
            <para>Do not read from the D-Bus socket.</para>
          </listitem>
        </varlistentry>

      </variablelist>
    </refsect2>

    <refsect2>
      <title>echo mode</title>
      <variablelist remap="TP">

        <varlistentry>
          <term><option>--name=</option><replaceable>NAME</replaceable></term>
          <listitem>
            <para>Before proceeding, request ownership of the well-known
              bus name <replaceable>NAME</replaceable>, for example
              <literal>com.example.Echo</literal>. By default,
              no name is requested, and the tool can only be addressed by
              a unique bus name such as <literal>:1.23</literal>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--sleep=</option><replaceable>MS</replaceable></term>
          <listitem>
            <para>Block for <replaceable>MS</replaceable> milliseconds
              before replying to a method call.</para>
          </listitem>
        </varlistentry>

      </variablelist>
    </refsect2>

    <refsect2>
      <title>spam mode</title>
      <variablelist remap="TP">

        <varlistentry>
          <term><option>--dest=</option><replaceable>NAME</replaceable></term>
          <listitem>
            <para>Send method calls to the well-known or unique
              bus name <replaceable>NAME</replaceable>.
              The default is the dbus-daemon,
              <literal>org.freedesktop.DBus</literal>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--count=</option><replaceable>N</replaceable></term>
          <listitem>
            <para>Send <replaceable>N</replaceable> method calls in total.
              The default is 1.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--queue=</option><replaceable>N</replaceable></term>
          <listitem>
            <para>Send <replaceable>N</replaceable> method calls before
              waiting for any replies, then send one new call per reply
              received, keeping <replaceable>N</replaceable> method calls
              "in flight" at all times until the number of messages specified
              with the <option>--count</option> option have been sent.
              The default is 1, unless <option>--flood</option>
              is used.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--flood</option></term>
          <listitem>
            <para>Send all messages without waiting for a reply,
              equivalent to <option>--queue</option> with an arbitrarily
              large <replaceable>N</replaceable>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--no-reply</option></term>
          <listitem>
            <para>Set the "no reply desired" flag on the messages.
              This implies <option>--flood</option>, since it disables
              the replies that would be used for a finite
              <option>--queue</option> length.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--messages-per-conn=</option><replaceable>N</replaceable></term>
          <listitem>
            <para>If given, send <replaceable>N</replaceable> method calls
              on the same connection, then disconnect and reconnect.
              The default is to use the same connection for all method
              calls.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--string</option></term>
          <listitem>
            <para>The payload of each message is a UTF-8 string. This is the
              default. The actual string used is given by the
              <option>--payload</option> or <option>--stdin</option>
              option, defaulting to "hello, world!".</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--bytes</option></term>
          <listitem>
            <para>The payload of each message is a byte-array.
              The actual bytes used are given by the
              <option>--payload</option> or <option>--stdin</option>
              option, defaulting to the ASCII encoding of
              "hello, world!".</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--empty</option></term>
          <listitem>
            <para>The messages have no payload.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--payload=</option><replaceable>S</replaceable></term>
          <listitem>
            <para>Use <replaceable>S</replaceable> as the
              <option>--string</option> or <option>--bytes</option>
              in the messages. The default is "hello, world!".</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--stdin</option></term>
          <listitem>
            <para>Read from standard input until end-of-file is reached,
              and use that as the <option>--string</option> or
              <option>--bytes</option> in the messages.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--message-stdin</option></term>
          <listitem>
            <para>Read a complete binary D-Bus method call message from
              standard input, and use that for each method call.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--random-size</option></term>
          <listitem>
            <para>Read whitespace-separated ASCII decimal numbers from
              standard input, choose one at random for each message,
              and send a message whose payload is a string of that
              length.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term><option>--seed=</option><replaceable>SEED</replaceable></term>
          <listitem>
            <para>Use <replaceable>SEED</replaceable> as the seed
              for the pseudorandom number generator, to have somewhat
              repeatable sequences of random messages.</para>
          </listitem>
        </varlistentry>

      </variablelist>
    </refsect2>
  </refsect1>

  <refsect1 id="bugs">
    <title>BUGS</title>
      <para>Please send bug reports to the D-Bus bug tracker or mailing list.
        See <ulink url="http://www.freedesktop.org/software/dbus/">http://www.freedesktop.org/software/dbus/</ulink>.</para>
  </refsect1>

  <refsect1 id="see_also">
    <title>SEE ALSO</title>
    <para><citerefentry><refentrytitle>dbus-send</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
  </refsect1>
</refentry>