Products › lamco-dbus-tools › Docs

dbussee commands: The D-Bus monitor's reference

dbussee commands: The reference for every command of the D-Bus monitor, from check, bus and names to record, watch, pending, audit, sandbox and introspect.

Generated from the help registry, as the man page dbussee(1) is. Don't edit: Change the registry and regenerate with LAMCO_DBUS_TOOLS_UPDATE_SNAPSHOTS=1 cargo test.

Watches a D-Bus bus and reads what describes it. It can't start or change anything.

It may hold commands of these layers: files, ask the bus, listen, ask a service.

Usage: dbussee [FLAGS] <command> [arguments]

Flags every program takes are in exit codes and flags.

dbussee audit collect

Read the bus's policy, service files, units, permission actions and profiles, for a policy and exposure audit

dbussee audit collect [--session] [--root <dir>] [--no-bus] [--no-score] [--out <file>]
  • --session: Audit the session bus. The system bus otherwise.
  • --root <dir>: Read a copy of a machine under this directory, as for a baseline taken elsewhere or a change tried first.
  • --no-bus: Don't ask the live bus who owns each name.
  • --no-score: Don't score units with systemd-analyze, which takes a moment for each.
  • --out <file>: Write the collection as a capture, for dbustell audit and dbustell policy.

Needs: The files, readable as this user; /etc/polkit-1/rules.d is often readable only by root, and the audit says so.

Layer: ask the bus. Maturity: beta.

Reads the bus's configuration as dbus-daemon and as dbus-broker read it, with each one's include order and the rules each drops or widens; the service files of the directories each reads; the units behind them, through their aliases, scored with systemd-analyze security --offline=yes; polkit's actions and rules files; the D-Bus rules of AppArmor profiles; whether SELinux is on. With a live bus, who owns each name and the unit its process is in, questions to the bus with the no-start flag. Then the per-name table: As whom each name runs, its unit's score, what every user may call and own on each implementation, its permission actions, and the POL and AUD findings.

$ dbussee audit collect
$ dbussee audit collect --out audit.json
$ dbussee audit collect --session --out session.json

dbussee sandbox list

Every sandbox's grant on the buses in brief, and each running Flatpak application's proxy and connections

dbussee sandbox list [--out <file>]
  • --out <file>: Write the inventory as a capture, for dbustell sandbox and dbustell findings.

Needs: The files, readable as this user. Running instances are this user's.

Layer: ask the bus. Maturity: beta.

Each Flatpak application with what it reaches on each bus: The whole bus, the proxy, or none. Each running instance with its proxy, found among this user's processes and tied to the instance by its /.flatpak-info, as the portals tie it, and each connection whose process the bus names as that proxy, which is a question to the bus for each connection. Snap profiles with D-Bus rules, and how many Firejail profiles filter, close or leave whole the session bus.

$ dbussee sandbox list
$ dbussee sandbox list --out inventory.json

dbussee sandbox show

One sandbox's grant in full: Its layers, the proxy options built from them, Flatpak's own reading, and its running proxies

dbussee sandbox show <name>
  • <name>: A Flatpak application's id, a Snap profile's label (snap.NAME.APP), or a Firejail profile's name.

Needs: The files, readable as this user. Flatpak's own reading needs the flatpak program.

Layer: ask the bus. Maturity: beta.

Flatpak's grant is merged in Flatpak's order: Runtime, application, the system's overrides for all and for it, the user's for all and for it. The proxy options are what Flatpak builds from it when it runs the application: The application's own names and the portals' rules added. When flatpak is installed, show asks it (flatpak info --show-permissions) and says whether it reads the buses the same. A running instance's proxy options are read back from the file the proxy was given them in, and set against the files. A Snap profile's D-Bus rules are shown as snapd wrote them; a Firejail profile's options are rebuilt from its dbus-user and dbus-system lines and its includes.

$ dbussee sandbox show org.gnome.TextEditor

dbussee sandbox inside

What a program sees from where it runs: Its bus, its environment and the names it's shown. Run it inside a sandbox

dbussee sandbox inside

Needs: A bus where it runs. The static build runs inside a sandbox from a directory the sandbox can read.

Layer: ask the bus. Maturity: beta.

The bus addresses and the environment it was given, /.flatpak-info, the bus's id, the names the bus shows it, and which of those amount to leaving a sandbox. In Flatpak, run the static build from a directory the run is given: flatpak run --command=/var/tmp/lamco/dbussee --filesystem=/var/tmp/lamco APPID sandbox inside. A program inside sees what the proxy lets it, so it can't see what's hidden; dbusdo sandbox probe asks about that from outside. Fails when no bus answers.

$ dbussee sandbox inside
$ dbussee --json sandbox inside

dbussee bus

Which bus this is, which program is the bus, and what it says of itself

dbussee bus [--bus <session|system|a11y>] [--address <address>] [--out <file>]
  • --bus <session|system|a11y>: Which bus to look at. Default: session. a11y is the accessibility bus, whose address is read from AT_SPI_BUS_ADDRESS or else asked of org.a11y.Bus on the session bus, with the no-start flag: That one call goes to a service, and the capture says so.
  • --address <address>: A bus by its address, such as unix:path=/run/user/1000/bus. It takes the place of --bus.
  • --out <file>: Write the capture to this file.
  • --json: Print the capture on standard output in place of the text.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: ask the bus. Maturity: beta.

Asks the bus for its id, the features and interfaces it lists, its statistics, the names it can start, and its own credentials. Then reads, in /proc, the process those credentials name, and runs that program with --version. dbus-broker answers with the process of its launcher, dbus-broker-launch. Which program is the bus is worked out from those records, and the text says so. A bus that won't answer a question is recorded with its error name: dbus-broker answers statistics in its own form, and a bus can refuse them. Every message sent carries the flag that forbids starting a service, and every one goes to the bus itself. Exits 1 when there's no bus.

$ dbussee bus
$ dbussee bus --bus system
$ dbussee bus --json --out bus.json

dbussee names

Who owns which name, who waits for one, and the process behind each connection

dbussee names [--bus <session|system|a11y>] [--address <address>] [--out <file>]
  • --bus <session|system|a11y>: Which bus to look at. Default: session. a11y is the accessibility bus, whose address is read from AT_SPI_BUS_ADDRESS or else asked of org.a11y.Bus on the session bus, with the no-start flag: That one call goes to a service, and the capture says so.
  • --address <address>: A bus by its address, such as unix:path=/run/user/1000/bus. It takes the place of --bus.
  • --out <file>: Write the capture to this file.
  • --json: Print the capture on standard output in place of the text.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: ask the bus. Maturity: beta.

Lists every name on the bus. For each well-known name it asks who owns it and who's queued for it. For each connection it asks the bus for its credentials (user, process, groups, security label), then reads the process's short name and control group in /proc. A process of another user may refuse some of these, and is recorded as not read. The table leaves out this tool's own connection and says which it was. One question is asked for each name and each connection, so a busy bus takes a moment. Exits 1 when there's no bus.

$ dbussee names
$ dbussee names --bus system
$ dbussee names --json --out names.json

dbussee observe

Everything this version can read of a bus, as one capture

dbussee observe [--bus <session|system|a11y>] [--address <address>] [--out <file>]
  • --bus <session|system|a11y>: Which bus to look at. Default: session. a11y is the accessibility bus, whose address is read from AT_SPI_BUS_ADDRESS or else asked of org.a11y.Bus on the session bus, with the no-start flag: That one call goes to a service, and the capture says so.
  • --address <address>: A bus by its address, such as unix:path=/run/user/1000/bus. It takes the place of --bus.
  • --out <file>: Write the capture to this file.
  • --json: Print the capture on standard output in place of the text.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: ask the bus. Maturity: beta.

What bus and names read, in one capture. Without --out or --json it prints only how many records it took, since the capture is the point. With no bus it still writes a capture, which says the bus wasn't examined and why, and exits 0.

$ dbussee observe --out bus.json
$ dbussee observe --json | dbustell health -

dbussee check

Observe, then the health summary of that capture

dbussee check [--bus <session|system|a11y>] [--address <address>] [--out <file>]
  • --bus <session|system|a11y>: Which bus to look at. Default: session. a11y is the accessibility bus, whose address is read from AT_SPI_BUS_ADDRESS or else asked of org.a11y.Bus on the session bus, with the no-start flag: That one call goes to a service, and the capture says so.
  • --address <address>: A bus by its address, such as unix:path=/run/user/1000/bus. It takes the place of --bus.
  • --out <file>: Write the capture to this file.
  • --json: Print the capture on standard output in place of the text.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: ask the bus. Maturity: beta.

The same as observe, then dbustell health of what it took. A capture it writes holds the summary as well, under summary, as this build read it; dbustell reads the records and not that. With no bus it reports finding BUS-001 and exits 0, since saying so is its job.

$ dbussee check
$ dbussee check --bus system
$ dbussee check --out bus.json

dbussee record

Listen to the bus's traffic for a time and record each message

dbussee record (--service <name> | --match <rule> | --all) [--duration <seconds>] [--bodies <length|hash|decoded|raw>] [--budget <MiB>] [--max-messages <n>] [--stream [--size-cap <MiB>] | --ring <seconds> [--after <seconds>] [--on-error[=<name>]] [--on-pending <ms>] [--now]] [--until-file <path>] [--no-keep | --rules-as-specified] [--pcap <path>] [--stats <seconds>] [--no-host] [--kernel] [--helper] [--accept-known-flaw] [--out <file>]
  • --service <name>: A name whose traffic to record both ways: What it sends, and what's sent to it. May be given more than once.
  • --match <rule>: A match rule as the bus reads it, such as type='signal',interface='org.freedesktop.Notifications'. May be given more than once.
  • --all: Every message on the bus. It costs the bus a copy of every message, so it's never the default.
  • --duration <seconds>: How long to listen. Default: 10. 0 is no time limit. Ctrl-C or SIGTERM ends it sooner, and the capture is whole.
  • --bodies <length|hash|decoded|raw>: How much of each body to keep. Default: length. hash adds its SHA-256, which tells two bodies apart and says nothing of them. decoded keeps the values, and raw the bytes as sent with their byte order. Both can hold passwords and secrets.
  • --budget <MiB>: Bytes that may wait between reading and writing before the recorder detaches itself. Default: 16 MiB, or an eighth of the bus's own limit for one connection where it can be read: dbus-broker's --max-bytes, or dbus-daemon's max_outgoing_bytes in its configuration.
  • --max-messages <n>: The most messages to record, or for a ring to hold. Default: 20000 for a document, which holds them in memory, 200000 for a ring, and none for a stream, which has --size-cap.
  • --stream: Write the capture to --out as it's taken: A line for its header, one for each record, and one that closes it. What was recorded is on disk at once, and a file left by a kill is read as far as it goes.
  • --size-cap <MiB>: With --stream: The size at which the stream ends itself. Default: 1024. 0 is no cap.
  • --ring <seconds>: Keep only the last this many seconds in memory, and keep them only when a trigger fires: --on-error, --on-pending, or SIGUSR1 sent to the recorder. It then records --after seconds more and ends.
  • --after <seconds>: With --ring: How long to go on recording once it fires. Default: 5.
  • --on-error[=<name>]: With --ring: Fire on an error reply, any or the one named, such as --on-error=org.freedesktop.DBus.Error.AccessDenied.
  • --on-pending <ms>: With --ring: Fire on a call that has had no reply for this long. It needs the replies in the rules, as --service and --all give them.
  • --now: With --ring: Fire at once. With dbuskeep keeping the bus, the ring starts from the last --ring seconds the service kept, filtered by --service and --match as the bus would, so the recording returns at once with what happened before it began; without one, with what came since it began.
  • --until-file <path>: End when this file appears. It must not exist when the recording starts.
  • --pcap <path>: Also write each message's bytes, exactly as the bus sent them, to this pcapng file, which Wireshark opens. Each record names its packet. Not with --ring.
  • --stats <seconds>: Poll the bus's counters every this many seconds while recording, as stats does, on the connection the snapshot used. Off by default.
  • --no-host: Don't read the host's journal, and the units it names, for the recording's span. By default record reads them, as journal does, once it has stopped listening.
  • --kernel: Also take the kernel's stamps at every socket of this bus, from dbuskeep kernel, for the recording's span: The kernel-sockets records, which dbustell timing --split reads. Not with --ring.
  • --accept-known-flaw: Record a system bus whose dbus-daemon is older than 1.16.4. See the notes.
  • --helper: Have dbussee-monitor become the monitor, read and guard in a process of its own, and pass each message on through a pipe. A recorder stopped by SIGSTOP or a debugger then can't make the bus stall or cut anyone off: The helper detaches. On by itself for the system bus without root, where only the installed helper may listen.
  • --no-keep: Listen with this command's own monitor, even when dbuskeep keeps the bus. Without it, a recording reads through the service when one keeps this bus: No second monitor, and a ring can start from what the service kept. With --service or --match the service applies the rules itself, as this bus applies a monitor's rules, dbus-daemon's or dbus-broker's way where they differ; the capture says which filtered.
  • --rules-as-specified: Have dbuskeep apply --service and --match as the specification reads them, not as this bus does. On dbus-broker, which never applies a rule's destination, --service otherwise takes every message, and the recording says so (BUS-004); with this, it takes the service's own traffic. Needs dbuskeep keeping the bus; not with --no-keep, --helper or --all.
  • --bus, --address, --out, --json: As for every command that looks at a bus. With --stream, --json prints what was written, not the capture.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: listen. Maturity: beta.

First a snapshot on one connection, of the bus and of who owns which name, as observe takes it. Then a second connection asks the bus to copy to it the messages its rules match, and adds one rule of its own, for the changes of who owns which name. The bus copies each matching message, which costs it work: Measured, recording everything raised a bus's own CPU time by 16 to 45%, about what dbus-monitor and busctl capture cost it. On dbus-daemon a narrow recording costs next to nothing. On dbus-broker any rule on a destination costs as much as recording everything, even when nothing matches it, and --service uses one; there, --match "sender='NAME'" takes what a service sends at only what it matches. The reader only reads and stamps; the writing is done by another thread. When more than the budget is waiting to be written, the recorder closes its own connection, so a slow disk or a terminal that stops reading can't make the bus stall a sender or cut other programs off, and exits 1 with a capture that says where it stopped and is whole up to there. Ctrl-Z ends a recording, whole, instead of stopping it, since a stopped monitor reads nothing. SIGSTOP and a debugger can't be taken: Then only the bus's own limits act, and measured, dbus-daemon stalls the sender while dbus-broker cuts the sender and the recorder off. A document holds about 3.7 KiB a message until it's written, so for long recordings use --stream, whose memory doesn't grow. A message carries no time of its own: Each record's one stamp is when the recorder read it. A ring that never fires exits 1, having kept nothing. On a system bus, listening needs root on most machines; without it the bus refuses, and record exits 1. Before 1.16.4, dbus-daemon could be crashed by an unprivileged user while a privileged monitor was attached to a system bus, so record refuses to monitor a system bus on an older version unless given --accept-known-flaw; a distribution may have patched it without changing the version. The measurements of 2026-11-28 are in the repository.

$ dbussee record --service org.freedesktop.Notifications --duration 30 --out notify.json
$ dbussee record --match "type='signal'" --duration 5 --out signals.json
$ dbussee record --all --stream --duration 0 --size-cap 200 --out session.jsonl
$ dbussee record --all --ring 120 --on-error --on-pending 5000 --duration 0 --out caught.json

dbussee watch

Show the bus's traffic as it happens, a line for each message

dbussee watch (--service <name> | --match <rule> | --all) [--duration <seconds>] [--bodies <length|hash|decoded|raw>] [--budget <MiB>] [--helper] [--accept-known-flaw] [--no-keep | --rules-as-specified]
  • --service <name>: A name whose traffic to take both ways. May be given more than once.
  • --match <rule>: A match rule as the bus reads it. May be given more than once.
  • --all: Every message on the bus. Never the default.
  • --bodies <length|hash|decoded|raw>: How much of each body to keep. Default: length.
  • --budget <MiB>: What may wait before the listener detaches itself, as for record.
  • --accept-known-flaw: As for record.
  • --helper: As for record: dbussee-monitor reads and guards in a process of its own.
  • --no-keep: As for record: This command's own monitor, even when dbuskeep keeps the bus.
  • --rules-as-specified: As for record: dbuskeep applies --service and --match as the specification reads them.
  • --bus, --address, --out, --json: As for every command that looks at a bus. --out writes the capture.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: listen. Maturity: beta.

The same listener and guard as record, printing each message instead of keeping it: Its time since the start, its type, sender and destination, and its path, member and signature, or what it replies to. --duration 0, the default, watches until Ctrl-C. The lines go to standard output and how it ended to standard error, so a pipe gets only the lines; a pipe closed early, as by head, ends it and it exits 0. With --json each line is one record, as a stream holds it. A terminal that stops reading, as Ctrl-S stops one, makes the listener detach itself past its budget, as for record, and Ctrl-Z ends it.

$ dbussee watch --service org.freedesktop.Notifications
$ dbussee watch --all --bodies decoded --duration 10
$ dbussee --json watch --match "type='error'" | jq .record.payload

dbussee pending

Listen a short time, then show the calls still waiting for a reply and who waits on whom

dbussee pending (--service <name> | --match <rule> | --all) [--duration <seconds>] [--bodies <length|hash|decoded|raw>] [--budget <MiB>] [--helper] [--accept-known-flaw] [--no-keep | --rules-as-specified]
  • --service <name>: A name whose traffic to take both ways. May be given more than once.
  • --match <rule>: A match rule as the bus reads it. May be given more than once.
  • --all: Every message on the bus. Never the default.
  • --bodies <length|hash|decoded|raw>: How much of each body to keep. Default: length.
  • --budget <MiB>: What may wait before the listener detaches itself, as for record.
  • --accept-known-flaw: As for record.
  • --helper: As for record: dbussee-monitor reads and guards in a process of its own.
  • --no-keep: As for record: This command's own monitor, even when dbuskeep keeps the bus.
  • --rules-as-specified: As for record: dbuskeep applies --service and --match as the specification reads them.
  • --bus, --address, --out, --json: As for every command that looks at a bus. --out writes the capture.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: listen. Maturity: beta.

Records for --duration seconds (default 5), then reads the recording: Each call with no reply when it ended, how long it had waited, and who it waits on, a well-known name resolved to whoever owned it when the call was made. A reply is matched to its call exactly, by the caller's unique name and serial. Calls that wait on a caller that's itself waiting are shown as chains, and callers that wait on each other as rings, where none can answer. It can't see a call made before it began listening, and a call whose reply the rules didn't take looks as if it waits: --service and --all take replies. The bus's own owner changes are decoded whatever --bodies says, since they hold only names.

$ dbussee pending --all
$ dbussee pending --service org.freedesktop.portal.Desktop --duration 10

dbussee journal

The bus's and the service manager's journal lines for the last while

dbussee journal [--since <span>]
  • --since <span>: How far back, as 90s, 30m or 2h. Default: 10m.
  • --bus, --address, --out, --json: As for every command that looks at a bus. --out writes the capture.

Needs: journalctl, and a bus to ask which process it is. The system's journal may be closed to this user, who then sees only their own lines.

Layer: files. Maturity: beta.

Asks the bus which process it is, then reads the journal through journalctl and keeps the lines that bear on the bus: The bus's own processes (dbus-daemon, or dbus-broker and its launcher), the service manager's lines that mention D-Bus or a name the bus can start, and what a service the bus started wrote. Each line keeps journald's stamp of when it received it, on the monotonic clock of this boot, so a line subtracts from a recording's times on the same machine and boot. record reads the same lines for its own span unless given --no-host.

$ dbussee journal
$ dbussee journal --since 1h
$ dbussee journal --bus system --since 30m

dbussee stats

The bus's counters, polled, and what each connection has waiting to be read

dbussee stats [--count <n>] [--every <seconds>] [--top <n>]
  • --count <n>: How many polls. Default: 1.
  • --every <seconds>: Seconds between polls. A fraction is allowed. Default: 1.
  • --top <n>: The most connections to show, the most held for first. Default: 20.
  • --bus, --address, --out, --json: As for every command that looks at a bus. --out writes the capture.

Needs: A bus: The session bus by default, the system bus with --bus system, the accessibility bus with --bus a11y, or any bus by its address with --address. No privilege: The questions are ones a bus answers anyone.

Layer: ask the bus. Maturity: beta.

Asks the bus's own statistics interface. dbus-daemon gives its totals and is asked about each connection in turn, so a poll is one question for each connection; dbus-broker gives every peer in one answer. Shows, for each connection, the bytes the bus held for it to read: The most at any poll, at the last, and on dbus-daemon the most ever since it joined. A connection with 1 MiB or more waiting at a poll, or a queue that grew at every poll over three or more, isn't reading: Finding NAME-005. A monitor gives up its unique name, so the counters can't name one. record polls the same counters with --stats.

$ dbussee stats
$ dbussee stats --count 10 --every 0.5
$ dbussee --json stats --count 3

dbussee introspect

A running service's objects and interfaces, asked with the flag that forbids starting it

dbussee introspect <service> [--path <path>] [--max-objects <n>]
  • <service>: The service, by its well-known or unique name.
  • --path <path>: Where in its tree to start. Default: /.
  • --max-objects <n>: The most objects to ask. Default: 2000.
  • --bus, --address, --out, --json: As for every command that looks at a bus. --out writes the capture, which dbustell drift reads.

Needs: A bus, and the service running: It isn't started.

Layer: ask a service. Maturity: beta.

Calls Introspect at each object, from --path down through the children each names, with the no-start flag, so a service that isn't running is left so and the command exits 1. A service started on demand, as systemd's hostname1 is, has to be running first. Prints each object with its interfaces and how many methods, signals and properties each has; the capture holds them whole.

$ dbussee introspect org.freedesktop.Notifications
$ dbussee introspect org.freedesktop.login1 --bus system --out login1.json

dbussee help

Every command in detail, or one command or group in full

dbussee help [<command> | <group>]
  • [<command> | <group>]: A command or a group of commands. Without one, every command is listed.

Needs: Nothing. It reads no bus and no file.

Maturity: stable.

Three forms of help come from one registry: --help gives the flags and a table of commands, help gives every command with its syntax, and help <command> gives one command in full. On a name it doesn't know, it says so and lists the names it does.

$ dbussee help
$ dbussee help check