Chapter 2
The Systems Toolkit
When a system misbehaves, the difference between hours and minutes is knowing which tool to reach for and what its output actually means. This chapter comes early because everything after it—filesystems local and networked, datacenter networks, resilient design—is easier to reason about once you can watch a running system instead of guessing at it. Treat it as the instrument shelf for the rest of the book, and come back to it whenever a later chapter needs a tool you haven't used.
This chapter teaches the tools themselves—their mental models, essential flags, and how to read their output; the domain chapters apply them to specific problems. We trace system calls with strace, read the kernel's live state from /proc, profile with perf, program the kernel's own tracing machinery with eBPF/bpftrace, build reproducible debugging environments with Nixpkgs/NixOS, and finish with Wireshark—watching the traffic between hosts, the view that Network & Distributed Filesystems reaches for first and Datacenter & Network Fundamentals builds on.
# Chapter Sections
Tracing system calls with strace: essential flags, filtering, and interpreting output.
/proc filesystemReading live kernel and per-process state for debugging.
perfProfiling with perf: where CPU time actually goes, hardware counters, and diagnosing cache and memory locality problems (perf mem, perf c2c).
eBPF/bpftraceProgrammable kernel tracing with eBPF and bpftrace: answering questions about a live system that no fixed tool can.
Nixpkgs/NixOSReproducible environments and system configuration for debugging and development.
WiresharkCapturing and analyzing network traffic with Wireshark and tcpdump.