chiark / gitweb /
busctl: introduce busctl "get-property" command for reading and dumping object properties
[elogind.git] / man / busctl.xml
index 33420a9cbc1f4ee30b9faa9c2d4ef6e958bb967e..730a3344d6cb90610ec1d34136cc4f8cb67fff60 100644 (file)
@@ -21,7 +21,8 @@ You should have received a copy of the GNU Lesser General Public License
 along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="busctl">
+<refentry id="busctl"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>busctl</title>
@@ -69,68 +70,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
     <para>The following options are understood:</para>
 
     <variablelist>
-      <varlistentry>
-        <term><option>-h</option></term>
-        <term><option>--help</option></term>
-
-        <listitem><para>Print a short help text and exit.
-        </para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--version</option></term>
-
-        <listitem>
-          <para>Print a short version string and exit.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--no-pager</option></term>
-
-        <listitem>
-          <para>Do not pipe output into a pager.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--system</option></term>
-
-        <listitem>
-          <para>Talk to the systemd system manager (the
-          default).</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>--user</option></term>
-
-        <listitem>
-          <para>Talk to the systemd manager of the calling
-          user.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>-H</option></term>
-        <term><option>--host</option></term>
-
-        <listitem>
-          <para>Execute the operation remotely. Specify a hostname, or
-          username and hostname separated by <literal>@</literal>, to
-          connect to. This will use SSH to talk to the remote systemd
-          instance.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-          <term><option>-M</option></term>
-          <term><option>--machine=</option></term>
-
-          <listitem><para>Execute the operation on a local container.
-          Specify a container name to connect to.</para></listitem>
-      </varlistentry>
-
       <varlistentry>
           <term><option>--address=<replaceable>ADDRESS</replaceable></option></term>
 
@@ -183,6 +122,53 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
           subset matching <replaceable>MATCH</replaceable>.</para></listitem>
           <!-- TODO: link to sd_bus_add_match when it is written? -->
       </varlistentry>
+
+      <varlistentry>
+        <term><option>--no-legend</option></term>
+
+        <listitem>
+          <para>Do not print the legend,
+          i.e. the column headers and the
+          footer.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--size=</option></term>
+
+        <listitem>
+          <para>When used with the <command>capture</command> command
+          specifies the maximum bus message size to capture
+          ("snaplen"). Defaults to 4096 bytes.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--list</option></term>
+
+        <listitem>
+          <para>When used with the <command>tree</command> command shows a
+          flat list of object paths instead of a tree.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--quiet</option></term>
+
+        <listitem>
+          <para>When used with the <command>call</command> command suppresses
+          display of the response message.</para>
+        </listitem>
+      </varlistentry>
+
+      <xi:include href="user-system-options.xml" xpointer="user" />
+      <xi:include href="user-system-options.xml" xpointer="system" />
+      <xi:include href="user-system-options.xml" xpointer="host" />
+      <xi:include href="user-system-options.xml" xpointer="machine" />
+
+      <xi:include href="standard-options.xml" xpointer="help" />
+      <xi:include href="standard-options.xml" xpointer="version" />
+      <xi:include href="standard-options.xml" xpointer="no-pager" />
     </variablelist>
   </refsect1>
 
@@ -195,24 +181,70 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <varlistentry>
         <term><command>list</command></term>
 
-        <listitem><para>Show endpoints attached to the bus. This is
-        the default if no command is specified.</para></listitem>
+        <listitem><para>Show service names on the bus. This is the
+        default if no command is specified.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><command>monitor</command>  <arg choice="opt" rep="repeat"><replaceable>NAME</replaceable></arg></term>
+        <term><command>tree</command> <arg choice="opt" rep="repeat"><replaceable>SERVICE</replaceable></arg></term>
+
+        <listitem><para>Shows an object tree of one or more
+        services. If <replaceable>SERVICE</replaceable> is specified,
+        show object tree of the specified services only. Otherwise,
+        show all object trees of all services on the bus that acquired
+        at least one well-known name.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><command>monitor</command> <arg choice="opt" rep="repeat"><replaceable>SERVICE</replaceable></arg></term>
 
         <listitem><para>Dump messages being exchanged. If
-        <replaceable>NAME</replaceable> is specified, show messages
+        <replaceable>SERVICE</replaceable> is specified, show messages
         to or from this endpoint. Otherwise, show all messages on the
         bus.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><command>status</command>  <arg choice="plain"><replaceable>NAME</replaceable></arg></term>
+        <term><command>capture</command> <arg choice="opt" rep="repeat"><replaceable>SERVICE</replaceable></arg></term>
+
+        <listitem><para>Similar to <command>monitor</command> but
+        writes the output in pcap format (for details see the <ulink
+        url="http://wiki.wireshark.org/Development/LibpcapFileFormat">Libpcap
+        File Format</ulink> description. Make sure to redirect the
+        output to STDOUT to a file. Tools like
+        <citerefentry><refentrytitle>wireshark</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+        may be used to dissect and view the generated
+        files.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><command>status</command> <arg choice="plain"><replaceable>SERVICE</replaceable></arg></term>
 
         <listitem><para>Show process information and credentials of a
-        bus endpoint.</para></listitem>
+        bus service.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><command>call</command> <arg choice="plain"><replaceable>SERVICE</replaceable></arg> <arg choice="plain"><replaceable>OBJECT</replaceable></arg> <arg choice="plain"><replaceable>INTERFACE</replaceable></arg> <arg choice="plain"><replaceable>METHOD</replaceable></arg> <arg choice="opt"><replaceable>SIGNATURE</replaceable> <arg choice="opt" rep="repeat"><replaceable>PARAMETERS</replaceable></arg></arg></term>
+
+        <listitem><para>Invoke a method and show the response. Takes a
+        service name, object path, interface name and method name. If
+        parameters shall be passed to the method call a signature
+        string is required, followed by the individual parameters,
+        individually formatted as textual arguments.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><command>get-property</command> <arg choice="plain"><replaceable>SERVICE</replaceable></arg> <arg choice="plain"><replaceable>OBJECT</replaceable></arg> <arg choice="opt"><replaceable>INTERFACE</replaceable> <arg choice="opt" rep="repeat"><replaceable>PROPERTIES</replaceable></arg></arg></term>
+
+        <listitem><para>Retrieve the current value one or more object
+        properties. Takes a service name and object path. Optionally
+        takes an interface name and property name. If the property
+        name is omited, shows all properties on the selected
+        interface. If the interface is also omitted shows the
+        properties of all interfaces. Multiple properties may be
+        specified at once in which case their values will be shown one
+        after the other.</para></listitem>
       </varlistentry>
 
       <varlistentry>
@@ -233,7 +265,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-bus-proxyd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>wireshark</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     </para>
   </refsect1>
 </refentry>