Products › lamco-dbus-tools › Docs
dbustell commands: Analyze a D-Bus capture
dbustell commands: The reference for every command that analyzes a D-Bus capture, from health, timing and pending to drift, audit, scrub, import and export.
Generated from the help registry, as the man page dbustell(1) is. Don't edit: Change the registry and regenerate with LAMCO_DBUS_TOOLS_UPDATE_SNAPSHOTS=1 cargo test.
Reads a stored capture and says what happened. It needs no bus.
It holds commands of no layer: It touches no bus.
Usage: dbustell [FLAGS] <command> [arguments]
Flags every program takes are in exit codes and flags.
dbustell drift
What changed between two descriptions of a service's interfaces, and whether it breaks an old client
dbustell drift <old> <new> [--service <name>] [--objects] [--junit <path>]
<old> <new>: Each an introspection XML file, as a project keeps them, or what dbussee introspect --out wrote.--service <name>: The service, in a capture of several.--objects: Compare the objects too, which two readings of one service on one machine can: Objects such as sessions differ from machine to machine.--junit <path>: Also write each change as a JUnit report, a breaking one failing.
Needs: Two descriptions. No bus, no session, no privilege.
Maturity: beta.
Each difference is one of DRIFT-001 to DRIFT-012 and breaking, for new clients only, or information, by the drift rules, which follow the one published set of rules for an interface break with two property signal rules turned round to what an old client sees. The standard interfaces every library adds are left out. Exits 1 when any change is breaking, so a service's CI can hold its stored description to what it runs.
$ dbustell drift interfaces/com.example.Catalog.xml live.json
$ dbustell drift before.json after.json --objects --junit drift.xml
dbustell audit
A policy and exposure audit of a collection: The per-name table, the findings, and against a baseline what's new
dbustell audit <collection> [--baseline <collection>] [--sarif <file>]
<collection>: What dbussee audit collect --out wrote.--baseline <collection>: An earlier collection: Each finding is then new, unchanged or absent, and what changed is listed, each name's reach, a unit's score, an action's defaults.--sarif <file>: Write the findings as SARIF 2.1.0: Each with its file and line where it has one, a fingerprint that doesn't move with lines, and its baseline state.
Needs: Nothing but the files.
Maturity: beta.
A finding's fingerprint is built from what it's about, the rule as written and its file, the name or the action, never a line number, so a finding stays the same finding when lines move. What every user may do is the evaluator's answer for a user no rule names, on each implementation.
$ dbustell audit audit.json
$ dbustell audit now.json --baseline last-month.json --sarif audit.sarif
dbustell policy
May this user send that, or own that, by a collection's policy: The verdict on each implementation and the rule that decided
dbustell policy <collection> --user <name> [--group <name>]... (--call <dest> <interface|-> <member> [<path>] | --own <name>)
<collection>: What dbussee audit collect --out wrote.--user <name>: Who sends or owns.--group <name>: One of its groups. Repeat it for more.--call <dest> <interface|-> <member> [<path>]: A call to ask about; - for one with no interface.--own <name>: A name to ask about owning.
Needs: Nothing but the files.
Maturity: beta.
Answers from the policy as each implementation reads it, as the evaluator decides it, which the oracle cases hold to both real daemons. Names the last rule that matched, or the default deny. An at_console block is said not to be evaluated, since whether a user has a seat isn't in the files.
$ dbustell policy audit.json --user alice --call org.freedesktop.hostname1 org.freedesktop.hostname1 SetHostname
$ dbustell policy audit.json --user alice --own com.example.Svc.Sub
dbustell sandbox
A sandbox inventory's findings, and with a recording of the same time, what each running application used
dbustell sandbox <inventory> [--traffic <recording>]
<inventory>: What dbussee sandbox list --out wrote.--traffic <recording>: A recording of the same time, of the same machine and boot: Then each running application's connections are read in it, for which names they called and which granted names they didn't.
Needs: Nothing but the files.
Maturity: beta.
Gives the SBX findings: A grant that amounts to leaving the sandbox (SBX-001), a running proxy enforcing other options than the files give (SBX-002), a proxy that failed a flaw probe (SBX-003, from dbusdo's capture of a probe), a grant not seen used (SBX-004, with --traffic), options that couldn't be read back (SBX-005), and the proxy and the evaluator disagreeing (SBX-006). A host monitor sees a proxied application as its proxy's connections, which the inventory ties to it; calls the proxy hid or refused never reach the bus, so what's counted is what the bus passed on. A grant used only now and then looks unused in a short recording.
$ dbustell sandbox inventory.json
$ dbustell sandbox inventory.json --traffic rec.json
dbustell health
What a capture examined, what it showed, and its findings
dbustell health <capture> [--junit <file>]
<capture>: A capture file a dbussee command wrote, or-for standard input.--junit <file>: Also write the findings as a JUnit report: A case for each, a problem failing it and a notice not.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Reads the records and nothing else: A summary a capture already holds is passed over. Which program is the bus is worked out from the process behind it. A capture this build can't read is refused whole, and dbustell exits 2.
$ dbustell health bus.json
$ dbussee observe --json | dbustell health -
dbustell findings
The findings of a capture, each with its identifier
dbustell findings <capture> [--junit <file>]
<capture>: A capture file a dbussee command wrote, or-for standard input.--junit <file>: Also write the findings as a JUnit report: A case for each, a problem failing it and a notice not.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Each finding has an identifier that never changes meaning, a severity, what was seen, and the indexes of the records it rests on. The findings reference lists them all.
$ dbustell findings bus.json
$ dbustell --json findings bus.json
dbustell timing
How long calls took: Each call paired with its answer, as distributions by destination and method
dbustell timing <capture> [--by <both|method|destination>] [--top <n>] [--caller <acts> [--split] | --max-p99 <ms> [--junit <path>]]
<capture>: A capture with messages, as dbussee record writes it, or-for standard input.--by <both|method|destination>: What to group by. Default: both, a row for each destination and method.--top <n>: The most rows to show, the slowest at the 99th percentile first. Default: 20.--caller <acts>: The capture dbusdo --out wrote of the same calls. Then each call is joined to its record at the bus by the caller's name and the call's serial, and the two figures are compared: At the caller, at the bus, and both trips across the socket together.--split: With --caller, and a recording made with --kernel: Each call followed through the eight stamps the kernel took at the four sockets it crossed, and its time split into the bus's, the service's, the sockets' and the caller's own. Exits 1 when the recording hasn't the kernel's stamps.--max-p99 <ms>: Check each group's 99th percentile against this many milliseconds: The groups over it are listed, and the exit status is 1 when any is.--junit <path>: With --max-p99: Also write a JUnit report, one case for each group with answered calls, failing where it's over the limit.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
A call is paired with its answer exactly: The call's sender and serial against the answer's destination and reply serial. Each figure runs from the bus passing on the call to the bus passing on its answer, as the recorder read them, so it holds the bus's queueing, the service waking and the service working, and is never pooled with a figure taken at the caller. Every row gives count, minimum, median, 95th and 99th percentile and maximum, by nearest rank. The floor is the shortest call the bus answered itself: Messages read together are stamped close together whatever their true gap, so a figure near the floor says only that the answer came at once. Calls that asked for no reply, and answers whose call isn't in the capture, are counted and left out. A capture imported from a standard file is timed on its writer's wall clock, and the report says so.
$ dbustell timing rec.json
$ dbustell timing rec.json --by method --top 5
$ dbustell --json timing rec.json
$ dbustell timing rec.json --max-p99 5 --junit timing.xml
dbustell pending
The calls still waiting for a reply when the capture ended, and who waits on whom
dbustell pending <capture>
<capture>: A capture file a dbussee command wrote, or-for standard input.--json: Print the reading as JSON.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
The same reading as dbussee pending, of a stored capture: Each call with no answer by the end, how long it had waited, and who it waits on, a well-known name resolved to whoever owned it when the call was made. Callers that wait on a callee that's itself waiting are shown as chains, and callers that wait on each other as rings, where none can answer. A call is waiting as of the end, and its caller may have given up, which never shows on the bus; a chain is evidence of a wait, not proof of its cause.
$ dbustell pending rec.json
$ dbustell --json pending rec.json
dbustell activation
Each start of a service: When it was asked for, began and took its name, or why it failed
dbustell activation <capture>
<capture>: A capture file a dbussee command wrote, or-for standard input.--json: Print the reading as JSON.
Needs: A capture. No bus, no session, no privilege. A recording made with its journal, as record makes one unless given --no-host, also says when each start began and why one failed.
Maturity: beta.
A start is asked for with StartServiceByName, or by a call to a name with no owner that the bus can start. Each is followed to the service taking its name, on the recorder's clock, and the figure's uncertainty is the longest the bus took to answer a call to itself, which it answers at once. With the journal, when the bus or the service manager began the start is journald's receipt of its line, on the same machine's monotonic clock, and holds however long journald took to receive it. A failure is given in the words of whoever logged it: dbus-daemon logs its own reason; dbus-broker has the service manager start the service, which logs the exit. What the service itself wrote is shown too.
$ dbustell activation rec.json
$ dbustell --json activation rec.json
dbustell names
Who held each name and when, and which changed hands or were lost
dbustell names <capture>
<capture>: A capture file a dbussee command wrote, or-for standard input.--json: Print the reading as JSON.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Starts from the snapshot a recording takes of who owns each name, then follows every change of owner the bus announced, which a recording always decodes. Says which names changed hands, which were lost and not retaken by the end, and how many connections joined and left. An imported capture holds no snapshot, so its history starts from the first change.
$ dbustell names rec.json
$ dbustell --json names rec.json
dbustell errors
Errors by name, sender and the call they answered, the bus's own apart
dbustell errors <capture>
<capture>: A capture file a dbussee command wrote, or-for standard input.--json: Print the reading as JSON.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Three groups: Errors the bus sent about calls to services, which mean it refused a call, couldn't deliver it, or answered for a service that never did (org.freedesktop.DBus.Error.NoReply, when the service left without answering or a time limit passed); errors the bus sent about calls to itself; and errors services sent. Each row names the call it answered when that call is in the capture.
$ dbustell errors rec.json
dbustell signals
Signals by sender and kind: How many, how often, and storms
dbustell signals <capture> [--top <n>]
<capture>: A capture file, or-for standard input.--top <n>: The most kinds to show, the busiest second first. Default: 20.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
A kind is one sender's signal at one path. For each: How many, how many a second over the recording, the most in any one second, and the bytes of their bodies. 100 or more of one kind in one second is marked a storm. A recording sees only the signals its rules took.
$ dbustell signals rec.json
$ dbustell signals rec.json --top 50
dbustell compare
Two captures compared: What differs in what lasts
dbustell compare <before> <after> [--timing] [--junit <file>]
<before>, <after>: Two capture files, as dbussee observe or record writes them.--timing: Also compare each method's median time: A difference when it moved by 2 times or more, with 20 calls or more on each side.--junit <file>: Also write the differences as a JUnit report, each a failing case.
Needs: Two captures. No bus, no session, no privilege.
Maturity: beta.
Compares what lasts from one reading to the next: The bus's program, version and features; each well-known name, the program that owns it and how many wait for it; the names that can be started; and, when both are recordings, the methods called and the errors seen. Unique names, process ids, connection counts and timings differ between any two readings of a machine, so they aren't compared, but for timing with --timing. Says whether the two are of one machine and one boot. Exits 0 either way; --junit gives a report a CI system fails on.
$ dbustell compare monday.json tuesday.json
$ dbustell compare before.json after.json --timing --junit diff.xml
dbustell scrub
A capture with its bodies removed and the machine's and users' names replaced
dbustell scrub <capture> [--out <file>]
<capture>: A capture file, or-for standard input.--out <file>: Write the scrubbed capture to this file. --json prints it.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Removes every message body, decoded, raw or hashed, and every stored byte string; the bus's own owner changes are kept, since they hold only names. Removes the host name and replaces it, every user name in a home directory's path, and anything shaped like an email address, wherever they appear. The machine's and boot's ids become a hash, so two scrubbed captures of one machine still compare as one. What it can't find is a person's name written anywhere else, such as in a well-known name or an object path: Read a scrubbed capture before sending it.
$ dbustell scrub rec.json --out rec-clean.json
dbustell bundle
The scrubbed capture and every report of it, in one directory, for a bug report
dbustell bundle <capture> --out <dir>
<capture>: A capture file, or-for standard input.--out <dir>: The directory to write. It must not exist yet.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Writes capture.json, scrubbed as scrub scrubs it, and the reports of it: health.txt, findings.json, and for a recording timing.txt, pending.txt, names.txt, errors.txt and signals.txt, each written from the scrubbed capture. README.txt says what was scrubbed and what scrubbing can't find.
$ dbustell bundle rec.json --out bug-1234 && tar czf bug-1234.tar.gz bug-1234
dbustell import
Read a pcap or pcapng file of D-Bus messages into a capture
dbustell import <file> [--bodies <length|hash|decoded|raw>] [--out <file>]
<file>: A pcapng file, as busctl capture and dbussee record --pcap write, or classic pcap, as dbus-monitor --pcap writes.--bodies <length|hash|decoded|raw>: How much of each body to keep. Default: length.--out <file>: Write the capture to this file. --json prints it.
Needs: A file. No bus, no session, no privilege.
Maturity: beta.
Each packet becomes a record as a recording makes one, read by the same header reader, which keeps header fields this build doesn't know. A packet's stamp is kept as the writing tool's wall clock, which can jump. The file says nothing of which machine it came from, holds no snapshot of who owned which name, and doesn't say what its writer was asked to record, and the capture says so. A file that isn't a D-Bus capture is refused whole, and dbustell exits 2.
$ dbustell import session.pcapng --out session.json
$ dbustell --json import monitor.pcap --bodies decoded | dbustell health -
dbustell export
Write a capture's messages to a pcapng file, for Wireshark
dbustell export <capture> --out <file>
<capture>: A capture file, or-for standard input.--out <file>: The pcapng file to write.
Needs: A capture. No bus, no session, no privilege.
Maturity: beta.
Each message is rebuilt from its record: The header from its fields, in the order the specification numbers them, and the body from its bytes. A message whose body wasn't kept as bytes is left out and counted, so record with --bodies raw to export everything; one with no body is always written. A sender may have written the header's fields in another order, so the bytes can differ from the ones sent while every value is the same. For the exact bytes, record with --pcap. Stamps are each message's arrival turned into the wall clock with the one offset the capture's end gives. Exits 1 when a capture holding messages gave none to write.
$ dbustell export rec.json --out rec.pcapng
dbustell help
Every command in detail, or one command or group in full
dbustell 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.
$ dbustell help
$ dbustell help health