Products › lamco-dbus-tools › Docs

The D-Bus capture format: Envelope, records and mechanisms

The D-Bus capture format lamco-dbus-tools writes: The envelope it shares with lamco-dsi-tools, each mechanism's records, and the pcapng files Wireshark opens.

Describes version 0.4.1. The source of truth is src/mechanism/, and for dbusdo's acts and the relay, src/drive/.

A capture is the document every dbussee command and dbusdo --out write, and every dbustell command reads. Its format is the capture format of lamco-dsi-tools, version v1, whose code is mirrored here (docs/reference/mirrored-sources.md). lamco-dsi-tools documents the envelope in full, in its docs/reference/capture-format.md. This page gives the envelope in brief, then what this toolkit puts in it.

A capture holds what the machine said. Nothing in it is a verdict. The summary member that check adds is the exception, and it's marked as one: It's what that build read from the records, and dbustell reads the records, not the summary.

The envelope

Member What this toolkit writes
schema_version v1
tool, tool_version dbussee and its version, dbusdo for its acts, or dbustell for a capture import made
timestamp When the capture was closed, for a person. Nothing is computed from it
host The kernel's host name
clock The machine, the boot, and the clock the stamps were read from (1, CLOCK_MONOTONIC)
window From the start of observing to its end
instrument The instrument's own CPU time
environment Whether a session bus and the system bus were found. The members about Wayland belong to the other toolkit and are null here
dissectors One entry for each mechanism, with how it ended
records Every record, in the order the mechanisms ran
summary Only from check: The health summary as that build read it

Values

A record's payload is a value in the form the format gives every value: An object with one member naming its type. {"str": "dbus-daemon"}, {"u32": 715}, {"list": [...]}, and {"map": [[name, value], ...]}, which keeps the order the members came in.

Two forms carry meaning beyond a value:

  • A fact that wasn't read is {"map": [["not_read", {"str": "<why>"}]]}. It's never an empty value or a zero, since those would read as observations.
  • A file descriptor is {"opaque_res": {"kind": "live_handle", ...}}. It's a live handle, not a number, and is recorded as a marker.

Answers

Every question to a bus is recorded as its answer: {"map": [["value", <the value>]]} when it was answered, and otherwise the fault:

Member Meaning
fault not available, refused, failed or timed out
error_name The bus's own error name, as it sent it
error_message The bus's own message, as it sent it
message When the bus sent no error: What went wrong, in words

A name nobody owns is not available. AccessDenied is refused. A bus that answers a question in a way another doesn't is recorded as it answered: dbus-broker refuses some statistics that dbus-daemon gives.

Mechanisms

bus-identity

Layer 1, with one step of layer 0: It records what the bus says of itself.

Member Payload
bus target: Which bus, as session, system, accessibility or address <address>
id An answer: The bus's id
features An answer: The Features property of the bus
interfaces An answer: The Interfaces property of the bus
stats An answer: What org.freedesktop.DBus.Debug.Stats.GetStats gave
activatable_names An answer: Every name the bus can start
driver_credentials An answer: The bus's credentials for itself
driver_process pid, comm, exe, cmdline, cgroup of the process those credentials name, from /proc. Present only when the bus gave a process id
driver_version program, exit_code, stdout, stderr of that program run with --version, and program_from: exe when the program was read from the process, cmdline when the process's program was closed to this user and the first word of its command line was used, path when that word was a bare name and the program of that name on PATH was used

dbus-broker answers for itself with the process of its launcher. Its driver_process is that of dbus-broker-launch, whose short name the kernel cuts to dbus-broker-lau. Measured with dbus-broker 37, 2026-11-28.

The system bus runs as another user, so exe is usually not read there, and cmdline is. A file named by a command line is a file on disk: If it was upgraded since the bus started, its version isn't the running bus's.

A command line may name no file. systemd lets a unit set the first word to a bare name, and KDE neon's system bus starts as @dbus-daemon. Then program_from is path: The program of the process's short name on the instrument's own PATH, which is the weakest evidence, since another program of that name could be the one running. Seen on KDE neon, 2026-11-28.

bus-names

Layer 1, with one step of layer 0: It records who's on the bus.

Member Payload
names An answer: Every name on the bus, well-known and unique
name One for each well-known name: name, owner (an answer), queued_owners (an answer: The owner first, then each connection waiting). A recording that started from dbuskeep's history holds the owners as of its first message instead, with as_of_ns and basis, and queued_owners not read
connection One for each unique name: unique_name, credentials (an answer), and process with comm and cgroup from /proc when the bus gave a process id. On dbus-broker credentials holds only ProcessID and UnixUserID, from GetConnectionUnixProcessID and GetConnectionUnixUser, and credentials_from says so and why: dbus-broker sends a process descriptor with every GetConnectionCredentials answer, every monitor gets a copy, and many recorders at once pass the user's quota of 64, when the bus disconnects monitors

The instrument's own connection is among the connection records. Readings leave it out and say which it was.

bus-messages

Layer 2: It holds one record for each message a monitor read, in the order it read them. Each record's one stamp is the instrument's arrival, the moment the reader took the message: D-Bus messages carry no time of their own, and protocol_time is always null to say so.

The header is read by the toolkit's own reader from the message's bytes, the same reader for a live recording and an imported file. The specification says a reader ignores header fields it doesn't know, and this one keeps them, where the library would refuse the message.

Member What it holds
type {"raw": n, "name": ...}: method_call, method_return, error or signal. A number the specification doesn't define has no name
flags {"raw": n, "names": [...]}: no_reply_expected, no_auto_start, allow_interactive_authorization, and unnamed_bits for any other bit set
serial, reply_serial As sent. reply_serial is null but on replies and errors
sender, destination, path, interface, member, error_name, signature As sent, null where the message has none
unix_fds The count of file descriptors the message says it carries, or null
body_bytes The body's length, as the header states it
protocol_version, byte_order As the message's first bytes state them
unknown_fields Only when there are any: Each field this build doesn't know, as code, signature and value, its bytes when its type isn't a string or a number
message_bytes The whole message's length
position The message's place in what the monitor read, from 0. A gap means a message the instrument lost, which no test has seen
packet Only with --pcap, or in an import: The message's packet in the standard capture file, from 0
truncated Only in an import, when the file's writer cut the packet short
body_sha256 With --bodies hash
body With --bodies decoded: The values, as a list. Always present for the bus's own NameOwnerChanged and for calls to its StartServiceByName, which hold only names
body_raw With --bodies raw: The body's bytes, in byte_order
activation_variables For a call to the bus's UpdateActivationEnvironment, whatever bodies were asked for: The names of the variables it sets, never their values
header Only when the header couldn't be read: Why, as a fact not read

The monitor's own first messages are among them: The name the bus gave it, taken back as it became a monitor.

How the records are kept

Form How
A document The default: Every record in memory, written as one document when the recording ends
A stream (--stream) The capture format's stream form, written to --out as it's taken: A first line with the header as far as it's known (opened, with soak saying what the command was asked for), a line for each record, and a closing line (closed) with the outcomes and how it ended: ran_its_length, size_cap, cut_short (a signal, or the reader of watch closing its output), fell_short (the recorder detached, or the bus or the file failed it) or until_file. A file a kill leaves has no closing line and is read as far as it goes
A ring (--ring) The last seconds in memory. When it fires, what led up to it and what followed are written as one document. When it doesn't, the document holds the snapshot and the ring's record, and no messages

host-journal

Layer 0: It holds the journal's lines that bear on the bus, read with journalctl for a span: By dbussee journal, and by record for its own span once it has stopped listening, unless given --no-host. A line is kept when it's from the bus's own processes (dbus-daemon, or dbus-broker and its launcher), from the service manager about the bus's units or a name the bus can start, or from a service the bus started, by its bus name or its dbus-:<unique>-<name>@<n>.service unit.

Member Payload
line message; from, the bus, the service manager or a service the bus started; pid, uid, comm, identifier, unit, user_unit, priority as journald gives them

Each line's stamps are journald's receipt of it, after it was written: On clock kernel_monotonic, which is CLOCK_MONOTONIC of the boot and subtracts from the recorder's arrivals, and on wall. Its instrument arrival is when the toolkit read it, and means nothing for timing. The outcome's detail says how many lines this user could read and how many were kept: A user who may not read the system's journal sees only their own lines.

host-units

Layer 0: It holds each unit the journal's lines name, and for each name they say was started the units meant to start it, read with systemctl show, from the user's manager for a session bus and the system's otherwise.

Member Payload
unit unit; manager; state, the properties Id, LoadState, ActiveState, SubState, Result, ExecMainStatus, NRestarts, and the manager's monotonic stamps of each change of state, as ..._ns
meant_for name, a bus name the journal says was started: dbus-daemon's Activating service name= or Activating via systemd: service name=, or dbus-broker's launcher's unit; manager; units, one for dbus-NAME.service and one for NAME.service, each asked and state, the properties Id, Names, LoadState, BusName, FragmentPath

A transient unit that has ended reads as not-found: The manager forgets it.

bus-counters

Layer 1: It holds the bus's own counters, polled by dbussee stats and by record --stats.

Member Payload
poll totals, the bus's GetStats without the broker's per-peer lists; peers, one for each connection with unique_name, outgoing_bytes (what the bus held for it to read), outgoing_messages, peak_outgoing_bytes (dbus-daemon's lifetime peak), incoming_bytes, match_rules, each null where the bus doesn't count it; asked_with

dbus-daemon is asked GetConnectionStats for each connection, so a poll is a question for each. dbus-broker refuses that and gives every peer in its GetStats. A monitor gives up its unique name, so no poll names one.

driver-acts

Layers 4 to 6: It holds what dbusdo --out writes: One record for each act, in the order they ran. Each stamp is dbusdo's own reading of the monotonic clock, named by its role. A figure at the caller is never pooled with one a monitor took: dbustell timing --caller joins them and keeps them apart.

Member Stamps Payload
call sent, just before sending; answered, just after reading the answer, when one came destination, path, interface (or null), member, signature; sender, the caller's unique name, and serial, which join it to a recording; pid, dbusdo's process, which joins it to the kernel's stamps; repeat_index, from 0; no_auto_start; outcome: reply, error or timed_out; error, with name and message; reply, the values; took_ns
set As call As call, for org.freedesktop.DBus.Properties.Set with the signature ssv
emit sent destination (null for a broadcast), path, interface, member, signature, sender, serial
own asked name; replace; reply, the bus's answer to RequestName: primary_owner, in_queue, exists, already_owner; held_ns, or null when the name wasn't taken
start asked name; reply: started, already_running, or the error; to_reply_ns, from asking to the bus's answer; to_owner_ns, from asking to the name's owner change arriving, which is watched for while the call is out, or null when none came
replay sent, answered recorded, the index of the record it repeats; destination, member, serial; then, how the recorded call ended (reply or an error name, null when the recording had no answer); now, how it ended this time, null when no answer came
load started asked_per_second, achieved_per_second, sent, body_bytes, late (signals sent more than a gap after they were due), took_ns, interface
relay started, ended program, as a list; program_pid, relay_pid; exit; bus, the address the relay joined; connections, accepted; names, the unique names the bus gave them; messages_to_bus, messages_to_program; fds_to_bus, fds_to_program; auth_rejected; bodies; identity, what the bus saw instead of the program, in words; lost, any stream the relay couldn't read back

The capture's dissectors entry for driver-acts names the bus and the caller's unique name.

kernel-sockets

Layer 7: It holds what dbuskeep kernel reported of this bus for the recording's span, taken by dbussee record --kernel: One record for each message that started in a write or a read on one of the bus's sockets, and one for each connection it refused. The kernel-level part has what the hooks see.

Member Stamps Payload
message On clock kernel_monotonic: sent or received, when the write or read ended, and sent begun or received begun, when it began direction, pid, cgroup, sock and peer (the kernel's addresses of the two ends, to pair them), offset, serial, reply_serial (0 unless an answer), length, type, flags
refused refused, when the connection was refused pid and cgroup of the process refused; the other fields 0
lost As message Where a header was due and wasn't: offset, direction, pid; that direction is followed again from the next write or read that starts with a header

The capture's dissectors entry says how many events came and two counts the hooks keep for the whole machine: Events the ring had no room for, and headers not found where one was due.

relay-messages

Layer 6: It holds what the relay read back from one program's socket, in the order it read them. The relay reads the stream after passing it on, so a record says what went through and never changes it.

Member Stamps Payload
auth read, passed line, one authentication line as sent: (nul) for the client's first byte, and a DATA line as its length only, since it can carry a challenge's answer; leg; connection
message read, when the relay read the bytes that completed the message; passed, when it had passed them on Everything a bus-messages record holds, read from the same bytes by the same reader; leg, to_bus or to_program; connection, from 0; sender_by_relay, on messages to the bus, the unique name the bus gave that connection, which is what the bus writes as their sender

A message to the bus has no sender of its own: The bus adds it. The lenses read sender_by_relay in its place, so a call pairs with its answer. A call's figure from a relay runs from the relay reading the call to the relay reading its answer, and dbustell timing names it so.

sandbox-grants

Layer 0: It holds what dbussee sandbox list --out read from files: One record for each grant.

Member Payload
flatpak_app id, installation; layers, each source: path in the order merged; escapes, each with granted, level, reaches and lets; session_reach and system_reach, whole, filtered or none, with session_options and system_options, the proxy options Flatpak builds; reading, the whole reading: Each layer's sockets and policies, and the merge
snap_profile label, snap.NAME.APP; rules, each D-Bus rule as snapd wrote it
firejail_profile name; session_reach and system_reach, whole (neither filter nor none), filtered or none, with the options rebuilt from the profile and its includes

sandbox-instances

Layer 1: It holds each Flatpak instance recorded in $XDG_RUNTIME_DIR/.flatpak.

Member Payload
flatpak_instance id, app, running, child_pid; proxy_pids, the proxies whose /.flatpak-info names this instance; session_options_live, read back from the file the proxy was given them in; session_options_files, built from the files; same_as_files, compared as sets, null when either is missing; unread, why a proxy's options couldn't be read; connections, the session-bus connections whose process the bus names as the proxy

service-interfaces

Layer 3: The service is called, Introspect at each object with the no-start flag. What dbussee introspect writes, and dbustell drift reads.

Member Payload
object One for each object with interfaces: service; path; json, the object's interfaces whole: Each with its methods and signals and their arguments (name, type, direction), its properties (name, type, access) and every annotation
walk service; owner, or why there was none; from, the path it began at; asked, objects; failed, each path and why; truncated and max_objects

audit-collection

Layer 0, and layer 1 for the live owners: It holds what dbussee audit collect --out writes: One collection record with bus, root and the counts read (policy_files, service_files, units, polkit_actions, apparmor_profiles), and json, the whole collection: Each implementation's reading of the policy with every rule's file and line and every note, the service files, the units with their scores, the permission actions and rules files, the directories that couldn't be read, the AppArmor profiles' D-Bus rules, whether SELinux is on, and the live owners. dbustell audit and dbustell policy read it.

instrument

It records what the instrument did.

Member Payload
connection bus; connected; unique_name; questions_asked, the number of messages it sent to the bus; service_calls, the number it sent to a service, which is only ever the one call that finds the accessibility bus; asked_of and no_start_flag_on_every_message, which state what every message was; highest_layer, the highest layer any of its messages reached (1, or 3 when a service was called). For the accessibility bus: address and address_from, environment or service. When the connection failed: connected false and fault with why
monitor Only in a recording: unique_name of the monitor connection; rules, as sent, an empty list for everything; queue_messages, the size of the library's queue in front of the reader; budget_bytes and budget_basis, what may wait before it detaches and where that figure came from; messages_read, bytes_read; high_water_bytes, the most ever waiting; writer_lag_ns, the longest a message waited for its record; messages_kept; read_after_stop, messages read after the writer had asked the recording to end; pcap_packets; ended: stopped, detached or closed_by_bus, and ended_detail with why, or, for detached, held_bytes and at_position, or held_bytes_not_read in place of held_bytes with why, when a recording through the helper never received the helper's last frame; bodies; asked, every option the command was given; listened_ns; service, dbuskeep when it did the reading: program, version, pid, socket, window_ms, listening_since_ns; filtered_by, who applied the rules: the bus, the service, the service, as the specification reads rules (with --rules-as-specified), or null for everything; helper, dbussee-monitor when it did: program, pid, privileged; sent_messages, always 0
ring Only with --ring: window_ms, after_ms, triggers; fired, fired_by in words and fired_at_position; messages_before and messages_after the trigger; aged_out, the messages it let go; no_room; calls_waiting and calls_not_tracked, for --on-pending
import Only in an import: file, form (pcapng or pcap), application, the writer the file names, messages, other_links, packets of another link type left out, truncated, and bodies

A capture made by import

dbustell import turns a pcapng or classic pcap file of D-Bus messages, as busctl capture, dbus-monitor --pcap and dbussee record --pcap write, into a capture. Each record's arrival is when dbustell read the packet, which is true and useless for timing, and its one native stamp is the packet's, on clock wall, with the role written by the capturing tool: The writer's wall clock, which can jump. The file says nothing of which machine or clock its stamps came from, holds no snapshot of who owned which name, and doesn't say what its writer was asked to record. Its bus-messages outcome says all of this, and health says the capture holds no reading of the bus itself.

The standard capture files

A pcapng file that record --pcap writes beside a capture has one section, one interface of link type 231 (raw D-Bus messages) with nanosecond stamps, and one packet for each message, the bytes as the bus sent them. The section's comment says what the stamps are: The wall clock at each arrival, turned from the recorder's monotonic clock with one offset read when it started. Each packet's comment gives the message's position. The capture in the toolkit's own format stays the source of truth.

dbustell export writes the same form from a capture, rebuilding each message from its record: The header from its fields, in the order the specification numbers them, and the body from body_raw. A message whose body wasn't kept as bytes is left out and counted. A sender may have written the fields in another order, so the bytes can differ from those sent while every value is the same, which the test of the round trip checks on both buses.

Outcomes

Each entry of dissectors says how its mechanism ended:

status Meaning here
ran It asked and recorded. Some questions may have been refused: Each record says
not_available There was no bus to ask. detail says why
refused The bus refused the connection
failed Something else went wrong. detail says what

observability names the layer: polled, layer 1 (ask the bus), or for bus-messages, whose messages the bus pushes, pushed, layer 2 (listen). The detail of bus-messages says how the recording ended, in words.

Reference captures

tests/fixtures/captures/ holds captures of a private dbus-daemon, a private dbus-broker, and no bus, made by scripts/make-fixtures and scrubbed of the machine, its user and the run's directory.