DBUS-MONITOR(1)

๐Ÿ’… dbus-monitor(1) โ€” your new fave little debug probe

okay so first things first, bestie: this is a manual page from User Commands, and the whole thing is about dbus-monitor. that's the star of the show. let's get into it ๐Ÿซถ


โœจ NAME โœจ

dbus-monitor โ€” a debug probe that prints message bus messages. that's it. that's the job. it snoops (lovingly) on your bus and prints what it sees ๐Ÿ’–


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

dbus-monitor [--system | --session | --address ADDRESS] [--profile |
             --monitor | --pcap | --binary] [watch expressions]

look at her. iconic bracket structure. no cap, this is literally the shape of the whole command ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so dbus-monitor is the command you use to monitor messages going through a D-Bus message bus. if you wanna know the big picture, like the whole lore, it's over at https://www.freedesktop.org/wiki/Software/dbus/ โ€” go read it, it's giving foundational text ๐Ÿ“š

so there are two well-known message buses, and you need to know both:

  • the systemwide message bus โ€” on many systems this is installed as the "messagebus" service
  • the per-user-login-session message bus โ€” this one gets started each time a user logs in

the --system and --session options point dbus-monitor at the system bus or the session bus respectively. and here's the default tea โ˜• โ€” if neither is specified, dbus-monitor monitors the session bus. she just picks for you, lowkey thoughtful.

dbus-monitor also has two different text output modes:

  1. the 'classic'-style monitoring mode
  2. profiling mode

the profiling format is a compact format โ€” a single line per message, plus microsecond-resolution timing information โฑ๏ธ (yes, microsecond. she's precise.) the --profile and --monitor options select the profiling and monitoring output format respectively.

and because one vibe isn't enough, there are also two binary output modes:

  • the binary mode, selected by --binary, outputs the entire binary message stream (without the initial authentication handshake)
  • the PCAP mode, selected by --pcap, adds a PCAP file header to the beginning of the output, and prepends a PCAP message header to each message โ€” this produces a binary file that can be read by, for instance, Wireshark ๐Ÿฆˆ
and if no mode is specified at all? dbus-monitor uses the monitoring output format. default queen behavior ๐Ÿ‘‘

so how do you actually get her to show you the messages you care about? you specify a set of watch expressions as you would expect to be passed to the dbus_bus_add_match function. that's the move ๐ŸŽฏ

โš ๏ธ real talk though: the message bus configuration may keep dbus-monitor from seeing all messages โ€” especially if you run the monitor as a non-root user. so if something's missing, it might not be you, it's the config ๐Ÿ™ˆ

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • --system โ€” monitor the system message bus ๐Ÿ–ฅ๏ธ
  • --session โ€” monitor the session message bus. and psst, this is the default โœจ
  • --address ADDRESS โ€” monitor an arbitrary message bus given at ADDRESS ๐ŸŒˆ
  • --profile โ€” use the profiling output format โฑ๏ธ
  • --monitor โ€” use the monitoring output format. also the default, she's consistent ๐Ÿ’–

โญ EXAMPLE โญ

here's an example of using dbus-monitor to watch for the gnome typing monitor to say things ๐Ÿ‘€

dbus-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'"

literally just copy that, it ate ๐Ÿ”ฅ


๐Ÿ’œ AUTHOR ๐Ÿ’œ

dbus-monitor was written by Philip Blundell. the profiling output mode was added by Olli Salli. legends, both of them ๐Ÿ‘‘๐Ÿซถ


๐Ÿ’€ BUGS ๐Ÿ’€

please send bug reports to the D-Bus mailing list or bug tracker โ€” the link is https://www.freedesktop.org/wiki/Software/dbus/ โ€” they wanna hear from you, fr fr ๐Ÿ›


and that's the whole page bestie!! mwah ๐Ÿ’‹ this was D-Bus 1.16.2, dated 03/03/2025 โ€” so if you're reading this way later, maybe go check if there's a glow-up version ๐ŸŒŸ iykyk

๐Ÿ“ฆ where this page comes from