Products › lamco-dbus-tools › Use cases
A D-Bus call slower after an upgrade: Compare, then send a capture
A D-Bus call slower after an upgrade: Compare two recordings' timing at the bus with dbustell, then scrub and bundle a capture and export pcapng for Wireshark.
After a service's upgrade, a program feels slower, and nothing in the changelog says why. lamco-dbus-tools found
what changed with dbussee, which recorded each version, dbusdo, which made the same 40 calls to
each, and dbustell, whose compare put the change at the bus and whose scrub and
bundle made the capture to send.
A real run on 2026-12-01 on Debian 13 against a private dbus-daemon 1.16.2, with a development build of
lamco-dbus-tools, version 0.1.0. run.sh ran it, catalog.py is the made-up service, not a real
application, run.txt is what it printed, and out/ holds what it wrote.
The symptom
After an upgrade of a catalog service, a program that looks titles up feels slower, and nothing in the service's changelog says why. The question is what changed on the bus between the two versions, and then how to hand the service's developers something they can use, with what's private removed and the rest read before it goes.
Before and after
Each version is recorded during the same 40 calls, with the program's own call made by dbusdo at its steady
pace: --repeat 40 --interval 0.02, a --timeout of 2 s so a hung call ends the test, and --no-auto-start
so the call fails at once rather than starting a service that isn't running.
dbussee record --all --bodies decoded --max-messages 5000 --duration 4 --out v1.json &
dbusdo call --repeat 40 --interval 0.02 --timeout 2 --no-auto-start com.example.Catalog /catalog com.example.Catalog.Find s Middlemarch
Then the two recordings compared, with their timing:
$ dbustell compare v1.json v2.json --timing --junit compare.xml
One machine, one boot. Compared: The bus, its well-known names and their owners' programs, who waits for them, the names that can be started, and the methods called and errors seen, and medians that moved by 2 times or more over 20 calls or more.
Not compared, since they differ between any two readings: Unique names, process ids, connection counts.
2 differences:
+ name com.example.Catalog.Indexer
~ timing com.example.Catalog com.example.Catalog.Find: median 2.36 ms over 40 calls -> median 6.46 ms over 40 calls
$ grep -c '<failure' compare.xml
2
Two things changed: The new version takes a second name, com.example.Catalog.Indexer, and Find takes almost
three times as long at the median, at the bus. A timing difference is reported only when a median moved by 2 times or more
over 20 calls or more on each side, so ordinary noise between two runs isn't one. --junit writes each
difference as a failing case, which is how a CI job comparing a release candidate with the last release fails on
it.
A capture to send upstream
The service's developers want the recording, but a recording holds what the bus carried: Message bodies, the
machine's name, user names in paths. scrub removes the bodies and the host name and replaces user names and email addresses, and
bundle adds the reports a developer reads first. Read what they wrote before you post it:
$ dbustell scrub v2.json --out v2-scrubbed.json
Scrubbed: 86 bodies and 2 byte strings removed; the host name removed; 0 user names and 0 email addresses replaced in 0 strings; the machine's and boot's ids hashed.
$ dbustell bundle v2-scrubbed.json --out bundle
Bundle written to bundle: capture.json, health.txt, findings.json, timing.txt, pending.txt, names.txt, errors.txt, signals.txt, README.txt.
In Wireshark
export writes the standard capture file Wireshark and dbus-monitor --pcap read. It needs each message's
bytes, so the recording it's made from is version 2's, which run.sh made with --bodies raw, not the scrubbed one, which has had its
bodies taken out:
$ dbustell export v2.json --out v2.pcapng
88 messages written to v2.pcapng.
Stamps: Each message's arrival on the recorder's clock, turned into the wall clock with the one offset the capture's own end gives.
$ dbustell export v2-scrubbed.json --out v2-scrubbed.pcapng
2 messages written to v2-scrubbed.pcapng.
86 left out: Their bodies weren't kept as bytes. Record with `--bodies raw` to export every message.
So the file for Wireshark stays on the machine, and the scrubbed bundle, read first, is what goes upstream. A file another tool wrote reads back into a capture, with the bodies decoded, and every lens reads it:
$ dbustell import v2.pcapng --bodies decoded --out v2-imported.json
$ dbustell timing v2-imported.json --top 3
...
DESTINATION METHOD CALLS ERR MIN MEDIAN 95TH 99TH MAX
com.example.Catalog com.example.Catalog.Find 40 0 6.33 ms 6.46 ms 6.64 ms 7.10 ms 7.10 ms
org.freedesktop.DBus org.freedesktop.DBus.Hello 1 0 7.11 µs 7.11 µs 7.11 µs 7.11 µs 7.11 µs
An imported capture's times are its writer's wall clock, and it names no machine or boot, which its findings say
(INS-001, INS-004): It can be read on its own, and not set against a recording of this machine.