Intermediate By Samson Tanimawo, PhD Published Sep 15, 2026 5 min read

tcpdump & strace Cheat Sheet

When the dashboards are green and the service is still broken, you reach for these two. Network packets, syscalls, and the six flag combos that catch 90% of the weird stuff.

tcpdump, by host and port

The host filter is the first one you reach for. Pick a peer, pick a port, capture only that conversation. Anything broader and you're scrolling instead of debugging.

tcpdump, protocols and flags

Once you've narrowed by endpoint, narrow by what's wrong. SYN floods, RST storms, ICMP unreachables, each has a one-line filter.

tcpdump, six flag combos that earn their keep

strace, attach and trace

Two modes. Either you launch the process under strace, or you attach to a running PID. Attach is the one you'll use 95% of the time during incidents.

strace, finding slow syscalls

Where strace earns its keep is on the latency side. Two flags: -T for per-syscall duration, -c for the summary at the end.

strace, six flag combos that earn their keep