🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Linux Advanced

What is Strace?

A diagnostic tool that traces system calls and signals made by a process, useful for debugging and performance analysis.

Strace intercepts and records system calls (file operations, network calls, memory allocation) made by a process. Usage: strace -p PID (attach to running process) or strace command (trace from start).

Useful flags include -e trace=network (filter network calls), -c (summary statistics), -f (follow forks), and -t (timestamps). Strace is invaluable for debugging permission issues, missing files, and understanding program behavior.