Crate of the Week

I would like to self nominate tsastat
It's a high-resolution Thread State Analysis (TSA) tool for Linux, inspired by a footnote in Brendan Gregg's Systems Performance book noting the lack of native Linux tools for this.Standard tools show CPU usage, but tsastat breaks down exactly why a thread is slow (e.g., 50% Executing vs 40% CPU Sched Wait vs 10% Disk I/O Wait).

Why it's cool for Rustaceans:

  • It bypasses high-level procfs wrappers and talks directly to the Linux Kernel Scheduler via raw Generic Netlink sockets.
  • It uses #[repr(C)] and std::ptr::read_unaligned to do zero-cost deserialization of the kernel's binary TLV payloads.
  • It wraps all this low-level kernel telemetry into a really clean, responsive TUI using ratatui.

It was a great exercise in mapping C-style memory alignment rules safely into Rust.

4 Likes