Skip to content
Linux · Rust · MIT

Know what every USB port 
is really doing

plugii is a live USB port monitor for Linux. For every physical socket it shows what is plugged in, at what link speed, and with what USB-C power, so a port that has quietly fallen back to USB 2 stands out.

$ plugii replay daisy-session.jsonl.gz --speed 2
A recorded session, replayed: the dock’s hub first comes up at USB 2 only, then at 5G. More on the TUI.

What it shows

Every socket, both halves

One card per physical socket, with its USB 3 and USB 2 halves side by side and the device tree under each. A USB 3 hub that only came up on the USB 2 half shows in red.

Capable vs. linked

plugii reads each device’s BOS descriptor for the fastest speed it could link at: “10G capable, linked at 5G → cable or hub limiting”. In the tree, a dim ↓ marks it.

USB-C and Power Delivery

UCSI partners, cables and alt modes, every source PDO a charger offers with the negotiated one marked, lit DisplayPort / HDMI connectors and Thunderbolt / USB4 authorization.

A health verdict

The report ends in ✓ / ⚠ / ✗ findings with what to do, and exits 1 if anything needs a look. -H prints only the verdict; --json gives the whole snapshot.

A live TUI, vim keys first

plugii watch: Ports, Charts and Events tabs, details on ⏎, a / filter, ghosts of unplugged devices, power and CPU timelines, link-speed strips, URB/s and a charger table.

Record and replay

watch --record writes the session as JSON lines (.gz and --redact too); plugii replay plays it back in the same TUI at up to ×60 and jumps between plugs.

Firmware checks

--firmware compares the BIOS and USB-C PD firmware with Lenovo’s and Dell’s catalogs and asks fwupd for pending and failed updates. Cached for a day; offline is fine.

Names for sockets

The kernel knows 0000:06:00.4-1, not “the port by the caps lock key”. A small labels file, or L in the TUI, names sockets, USB-C ports and devices.

No root, no daemon

It reads sysfs, udev and journalctl -k as your user; where RAPL energy is root-only, it leaves the package watts out. One binary; the TUI rescans on udev events and once a second.

Start here