1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
3 <refentry id="dbus-test-tool.1">
7 <holder>Collabora Ltd.</holder>
10 <para>This man page is distributed under the same terms as
11 dbus-test-tool (GPL-2+). There is NO WARRANTY, to the extent
12 permitted by law.</para>
17 <refentrytitle>dbus-test-tool</refentrytitle>
18 <manvolnum>1</manvolnum>
19 <refmiscinfo class="manual">User Commands</refmiscinfo>
20 <refmiscinfo class="source">D-Bus</refmiscinfo>
21 <refmiscinfo class="version">@DBUS_VERSION@</refmiscinfo>
24 <refname>dbus-test-tool</refname>
25 <refpurpose>D-Bus traffic generator and test tool</refpurpose>
28 <refsynopsisdiv id="synopsis">
30 <command>dbus-test-tool</command>
31 <arg choice="plain">black-hole</arg>
33 <arg choice="plain">--session</arg>
34 <arg choice="plain">--system</arg>
36 <arg choice="opt">--name=<replaceable>NAME</replaceable></arg>
37 <arg choice="opt">--no-read</arg>
41 <command>dbus-test-tool</command>
42 <arg choice="plain">echo</arg>
44 <arg choice="plain">--session</arg>
45 <arg choice="plain">--system</arg>
47 <arg choice="opt">--name=<replaceable>NAME</replaceable></arg>
48 <arg choice="opt">--sleep-ms=<replaceable>MS</replaceable></arg>
52 <command>dbus-test-tool</command>
53 <arg choice="plain">spam</arg>
55 <arg choice="plain">--session</arg>
56 <arg choice="plain">--system</arg>
58 <arg choice="opt">--dest=<replaceable>NAME</replaceable></arg>
59 <arg choice="opt">--count=<replaceable>N</replaceable></arg>
60 <arg choice="opt">--flood</arg>
61 <arg choice="opt">--ignore-errors</arg>
62 <arg choice="opt">--messages-per-conn=<replaceable>N</replaceable></arg>
63 <arg choice="opt">--no-reply</arg>
64 <arg choice="opt">--queue=<replaceable>N</replaceable></arg>
65 <arg choice="opt">--seed=<replaceable>SEED</replaceable></arg>
67 <arg choice="plain">--string</arg>
68 <arg choice="plain">--bytes</arg>
69 <arg choice="plain">--empty</arg>
72 <arg choice="plain">--payload=<replaceable>S</replaceable></arg>
73 <arg choice="plain">--stdin</arg>
74 <arg choice="plain">--message-stdin</arg>
75 <arg choice="plain">--random-size</arg>
80 <refsect1 id="description">
81 <title>DESCRIPTION</title>
82 <para><command>dbus-test-tool</command> is a multi-purpose tool
83 for debugging and profiling D-Bus.</para>
85 <para><command>dbus-test-tool black-hole</command>
86 connects to D-Bus, optionally requests a name, then does not
87 reply to messages. It normally reads and discards messages from
88 its D-Bus socket, but can be configured to sleep forever without
91 <para><command>dbus-test-tool echo</command>
92 connects to D-Bus, optionally requests a name, then sends back an
93 empty reply to every method call, after an optional delay.</para>
95 <para><command>dbus-test-tool spam</command>
96 connects to D-Bus and makes repeated method calls,
97 normally named <literal>com.example.Spam</literal>.</para>
100 <refsect1 id="options">
101 <title>OPTIONS</title>
103 <title>Common options</title>
104 <variablelist remap="TP">
107 <term><option>--session</option></term>
109 <para>Connect to the session bus. This is the default.</para>
114 <term><option>--system</option></term>
116 <para>Connect to the system bus.</para>
124 <title>black-hole mode</title>
125 <variablelist remap="TP">
128 <term><option>--name=</option><replaceable>NAME</replaceable></term>
130 <para>Before proceeding, request ownership of the well-known
131 bus name <replaceable>NAME</replaceable>, for example
132 <literal>com.example.NoReply</literal>. By default,
133 no name is requested, and the tool can only be addressed by
134 a unique bus name such as <literal>:1.23</literal>.</para>
139 <term><option>--no-read</option></term>
141 <para>Do not read from the D-Bus socket.</para>
149 <title>echo mode</title>
150 <variablelist remap="TP">
153 <term><option>--name=</option><replaceable>NAME</replaceable></term>
155 <para>Before proceeding, request ownership of the well-known
156 bus name <replaceable>NAME</replaceable>, for example
157 <literal>com.example.Echo</literal>. By default,
158 no name is requested, and the tool can only be addressed by
159 a unique bus name such as <literal>:1.23</literal>.</para>
164 <term><option>--sleep-ms=</option><replaceable>MS</replaceable></term>
166 <para>Block for <replaceable>MS</replaceable> milliseconds
167 before replying to a method call.</para>
175 <title>spam mode</title>
176 <variablelist remap="TP">
179 <term><option>--dest=</option><replaceable>NAME</replaceable></term>
181 <para>Send method calls to the well-known or unique
182 bus name <replaceable>NAME</replaceable>.
183 The default is the dbus-daemon,
184 <literal>org.freedesktop.DBus</literal>.</para>
189 <term><option>--count=</option><replaceable>N</replaceable></term>
191 <para>Send <replaceable>N</replaceable> method calls in total.
192 The default is 1.</para>
197 <term><option>--queue=</option><replaceable>N</replaceable></term>
199 <para>Send <replaceable>N</replaceable> method calls before
200 waiting for any replies, then send one new call per reply
201 received, keeping <replaceable>N</replaceable> method calls
202 "in flight" at all times until the number of messages specified
203 with the <option>--count</option> option have been sent.
204 The default is 1, unless <option>--flood</option>
210 <term><option>--flood</option></term>
212 <para>Send all messages without waiting for a reply,
213 equivalent to <option>--queue</option> with an arbitrarily
214 large <replaceable>N</replaceable>.</para>
219 <term><option>--no-reply</option></term>
221 <para>Set the "no reply desired" flag on the messages.
222 This implies <option>--flood</option>, since it disables
223 the replies that would be used for a finite
224 <option>--queue</option> length.</para>
229 <term><option>--messages-per-conn=</option><replaceable>N</replaceable></term>
231 <para>If given, send <replaceable>N</replaceable> method calls
232 on the same connection, then disconnect and reconnect.
233 The default is to use the same connection for all method
239 <term><option>--string</option></term>
241 <para>The payload of each message is a UTF-8 string. This is the
242 default. The actual string used is given by the
243 <option>--payload</option> or <option>--stdin</option>
244 option, defaulting to "hello, world!".</para>
249 <term><option>--bytes</option></term>
251 <para>The payload of each message is a byte-array.
252 The actual bytes used are given by the
253 <option>--payload</option> or <option>--stdin</option>
254 option, defaulting to the ASCII encoding of
255 "hello, world!".</para>
260 <term><option>--empty</option></term>
262 <para>The messages have no payload.</para>
267 <term><option>--payload=</option><replaceable>S</replaceable></term>
269 <para>Use <replaceable>S</replaceable> as the
270 <option>--string</option> or <option>--bytes</option>
271 in the messages. The default is "hello, world!".</para>
276 <term><option>--stdin</option></term>
278 <para>Read from standard input until end-of-file is reached,
279 and use that as the <option>--string</option> or
280 <option>--bytes</option> in the messages.</para>
285 <term><option>--message-stdin</option></term>
287 <para>Read a complete binary D-Bus method call message from
288 standard input, and use that for each method call.</para>
293 <term><option>--random-size</option></term>
295 <para>Read whitespace-separated ASCII decimal numbers from
296 standard input, choose one at random for each message,
297 and send a message whose payload is a string of that
303 <term><option>--seed=</option><replaceable>SEED</replaceable></term>
305 <para>Use <replaceable>SEED</replaceable> as the seed
306 for the pseudorandom number generator, to have somewhat
307 repeatable sequences of random messages.</para>
317 <para>Please send bug reports to the D-Bus bug tracker or mailing list.
318 See <ulink url="http://www.freedesktop.org/software/dbus/">http://www.freedesktop.org/software/dbus/</ulink>.</para>
321 <refsect1 id="see_also">
322 <title>SEE ALSO</title>
323 <para><citerefentry><refentrytitle>dbus-send</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>