Products › lamco-dbus-tools › Docs
Get started with lamco-dbus-tools: Install, verify and run
Get started with lamco-dbus-tools: Download and verify a release tarball or build from source, then check a session bus and time 50 D-Bus calls.
Install
A release tarball
Each release on the releases page has a tarball
named lamco-dbus-tools-<version>-<target>.tar.gz for each of its targets. A tarball holds the five
programs, dbussee, dbusdo, dbustell, dbuskeep and dbussee-monitor, with the README, the changelog,
the security policy, the two license files, a man page for each program under doc/man/, the systemd units
for dbuskeep under packaging/, and scripts/install-helper.
| Target | What it needs to run |
|---|---|
x86_64-unknown-linux-musl, aarch64-unknown-linux-musl |
Nothing. The programs are statically linked, with the kernel part built in, and can be copied to any Linux machine of that architecture. The 64-bit ARM programs have run only under emulation |
tar -xzf lamco-dbus-tools-<version>-<target>.tar.gz
cd lamco-dbus-tools-<version>-<target>
./dbussee --version
Run them from there, or copy them to a directory on your PATH. Keep dbussee-monitor in the directory
dbussee is in, which is where dbussee looks for it first on a user's bus. To let the members of one group
record the system bus without root, install the helper setuid with
sudo scripts/install-helper ./dbussee-monitor; SECURITY.md says what it then does.
Verifying a download
A release also has SHA256SUMS, one file over every tarball, with its signature SHA256SUMS.asc, and a
signature beside each tarball (.tar.gz.asc). They're made with the release key of Lamco Development LLC,
whose fingerprint is CA11F781516743D5D9A1A12F17B95B68A50CD3A7; the signing subkey that gpg names in its
output is 405CB1E36258DA1DA406A852A236DDB84E0EC96E.
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys CA11F781516743D5D9A1A12F17B95B68A50CD3A7
gpg --verify SHA256SUMS.asc SHA256SUMS # the list is the one that was signed
sha256sum --check --ignore-missing SHA256SUMS # the tarball you have is the one in the list
From crates.io
cargo install lamco-dbus-tools # the five programs, without the kernel part
cargo install lamco-dbus-tools --features kernel # with dbuskeep kernel
That builds and installs dbussee, dbusdo, dbustell, dbuskeep and dbussee-monitor from source, and needs Rust 1.89 or later. The default build needs nothing else. --features kernel compiles the in-kernel programs, and needs clang and libbpf's headers (clang and libbpf-dev on Debian and Ubuntu). cargo binstall lamco-dbus-tools takes a release's tarball in place of a build; it doesn't check the tarball's GPG signature, which verifying a download does. The crate is lamco-dbus-tools on crates.io, published from the repository at each release's tag.
To install the helper setuid for the system bus, run scripts/install-helper from the repository with the path of the installed program: sudo scripts/install-helper ~/.cargo/bin/dbussee-monitor.
From source
See the first five minutes and Building.
The first five minutes
From a release tarball, skip to the next step. Otherwise build it (Rust 1.89 or newer; it links no C library):
git clone https://github.com/lamco-admin/lamco-dbus-tools.git && cd lamco-dbus-tools
cargo build --release
export PATH=$PWD/target/release:$PATH
Ask your session bus what it is, and check it:
$ dbussee check
Bus (session): dbus-daemon 1.16.2
Read from the process behind the bus, and what its program prints for --version.
Names: 42 well-known, 57 connections, 62 names that can be started
Instrument: 149 questions, all to the bus itself and none able to start a service
Findings: 0 problems, 1 notices
BUS-003 (notice): This dbus-daemon has the monitoring flaw fixed in 1.16.4
...
Record five seconds of everything on it, while dbusdo calls the bus 50 times:
$ dbussee record --all --duration 5 --out first.json &
$ dbusdo call --repeat 50 org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner s org.freedesktop.DBus
50 calls, 50 answered, 0 not with a reply. At the caller: min 40.01 µs, median 46.26 µs, 95th 76.44 µs, 99th 93.77 µs, max 93.77 µs
capture written to first.json
109 messages recorded. Stopped: the duration ran out.
Then read it, with no bus needed:
$ dbustell timing first.json --by method
51 calls asked for a reply: 51 replied, 0 answered with an error, 0 had no answer by the end. 0 asked for none.
...
DESTINATION METHOD CALLS ERR MIN MEDIAN 95TH 99TH MAX
- org.freedesktop.DBus.Hello 1 0 6.63 µs 6.63 µs 6.63 µs 6.63 µs 6.63 µs
- org.freedesktop.DBus.GetNameOwner 50 0 2.05 µs 2.72 µs 5.01 µs 5.64 µs 5.64 µs
The same 50 calls took a median of 46 µs at the caller and 2.7 µs at the bus: The rest is the two trips
across the socket and the caller's own work. Time on a bus says what
each figure holds; dbuskeep kernel splits it at every socket. Every output
above is from a run on a desktop's own session bus,
docs/measurements/stage-13/first-minutes/.