'\" t
.\"     Title: dbus-monitor
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 06/12/2023
.\"    Manual: User Commands
.\"    Source: D-Bus 1.12.20
.\"  Language: English
.\"
.TH "DBUS\-MONITOR" "1" "06/12/2023" "D\-Bus 1\&.12\&.20" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dbus-monitor \- debug probe to print message bus messages
.SH "SYNOPSIS"
.HP \w'\fBdbus\-monitor\fR\ 'u
\fBdbus\-monitor\fR [\-\-system | \-\-session | \-\-address\ \fIADDRESS\fR] [\-\-profile | \-\-monitor | \-\-pcap | \-\-binary] [\fIwatch\fR\ \fIexpressions\fR]
.br

.SH "DESCRIPTION"
.PP
The
\fBdbus\-monitor\fR
command is used to monitor messages going through a D\-Bus message bus\&. See
\m[blue]\fBhttp://www\&.freedesktop\&.org/software/dbus/\fR\m[]
for more information about the big picture\&.
.PP
There are two well\-known message buses: the systemwide message bus (installed on many systems as the "messagebus" service) and the per\-user\-login\-session message bus (started each time a user logs in)\&. The \-\-system and \-\-session options direct
\fBdbus\-monitor\fR
to monitor the system or session buses respectively\&. If neither is specified,
\fBdbus\-monitor\fR
monitors the session bus\&.
.PP
\fBdbus\-monitor\fR
has two different text output modes: the \*(Aqclassic\*(Aq\-style monitoring mode, and profiling mode\&. The profiling format is a compact format with a single line per message and microsecond\-resolution timing information\&. The \-\-profile and \-\-monitor options select the profiling and monitoring output format respectively\&.
.PP
\fBdbus\-monitor\fR
also has 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\&.
.PP
If no mode is specified,
\fBdbus\-monitor\fR
uses the monitoring output format\&.
.PP
In order to get
\fBdbus\-monitor\fR
to see the messages you are interested in, you should specify a set of watch expressions as you would expect to be passed to the
\fIdbus_bus_add_match\fR
function\&.
.PP
The message bus configuration may keep
\fBdbus\-monitor\fR
from seeing all messages, especially if you run the monitor as a non\-root user\&.
.SH "OPTIONS"
.PP
\fB\-\-system\fR
.RS 4
Monitor the system message bus\&.
.RE
.PP
\fB\-\-session\fR
.RS 4
Monitor the session message bus\&. (This is the default\&.)
.RE
.PP
\fB\-\-address ADDRESS\fR
.RS 4
Monitor an arbitrary message bus given at ADDRESS\&.
.RE
.PP
\fB\-\-profile\fR
.RS 4
Use the profiling output format\&.
.RE
.PP
\fB\-\-monitor\fR
.RS 4
Use the monitoring output format\&. (This is the default\&.)
.RE
.SH "EXAMPLE"
.PP
Here is an example of using dbus\-monitor to watch for the gnome typing monitor to say things
.sp
.if n \{\
.RS 4
.\}
.nf

  dbus\-monitor "type=\*(Aqsignal\*(Aq,sender=\*(Aqorg\&.gnome\&.TypingMonitor\*(Aq,interface=\*(Aqorg\&.gnome\&.TypingMonitor\*(Aq"

.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.PP
dbus\-monitor was written by Philip Blundell\&. The profiling output mode was added by Olli Salli\&.
.SH "BUGS"
.PP
Please send bug reports to the D\-Bus mailing list or bug tracker, see
\m[blue]\fBhttp://www\&.freedesktop\&.org/software/dbus/\fR\m[]
