MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Using dbus-monitor

The dbus-monitor command is used to monitor messages going through the D-Bus message bus, which handles a lot of interprocess communication on Harmattan devices. The tool is preinstalled on the Harmattan device.

The MeeGo 1.2 Harmattan platform has two message buses that dbus-monitor can monitor in two modes. The message buses are the systemwide message bus and a session-specific message bus, which only monitors the activities of the session started by a single user account.

The two modes are a normal monitoring mode, which returns broader information on D-Bus messages, and a profiling mode, which returns single-line D-Bus messages on a microsecond-level accuracy.

Generally, you can run dbus-monitor as a root user to track messages from low-level system interactions. Filter the message stream by specifying a set of watch expressions using the dbus_bus_add_match function.

You can use dbus-monitor with the following options:

  • --system monitors the system message bus.
  • --session monitors the session message bus (default).
  • --profile uses the profiling output format.
  • --monitor uses the monitoring output format (default).

Note: The default D-Bus security policy on Harmattan does not allow dbus-monitor to receive messages (except for signals) on the system message bus.

Output examples

The tool generates the following output for a contact creation message:

method call sender=:1.145 -> dest=:1.30 serial=98 path=/org/gnome/evolution/dataserver/addressbook/file_3a__2f__2f__2f_home_2f_user_2f__2e_osso_2d_abook_2f_db; interface=org.gnome.evolution.dataserver.addressbook.Book; member=addContact
   string "BEGIN:VCARD
FN:George Lewis
method return sender=:1.30 -> dest=:1.145 reply_serial=98
   string "7"

The tool generates the following output for a volume change message:

signal sender=:1.49 -> dest=(null destination) serial=89 path=/com/nokia/mafw/renderer/gstrenderer;; member=property_changed
   string "volume"
   variant       uint32 23