Diagnostic tool for tracing system calls and signals of a running process
Updated at: March 16, 2025
Tracing Process Execution
Strace is a diagnostic tool that intercepts and records system calls made by a process and the signals received by it. It's invaluable for debugging, understanding application behavior, and diagnosing issues without source code access.
Output Control
Control how strace output is captured, formatted, and stored. Managing output is essential for analyzing complex traces, creating logs for later review, and formatting data for better readability.
System Call Filtering
System call filtering allows you to focus on specific system calls or patterns during tracing, reducing noise and helping pinpoint issues. strace provides multiple filtering mechanisms that can be combined to create precise traces.
Process Selection
Process selection in strace allows you to target specific processes for tracing. You can trace by PID, name, process groups, or threads, giving you flexibility to monitor exactly what you need while debugging complex applications.
Signal Handling
Signal handling in strace allows you to monitor and control how signals are processed between the tracer and traced processes. This is crucial for debugging signal-related issues and understanding how applications respond to various signals.
Performance Analysis
Performance analysis with strace helps identify bottlenecks in process execution by measuring system call times, counting invocations, and generating summaries to pinpoint slow operations and optimize application performance.
Debugging Techniques
Strace is a powerful debugging tool that helps identify issues by revealing system calls and signals. It can uncover file access problems, permission issues, network connection errors, and process hangs by showing exactly how a program interacts with the operating system.
Related Cheatsheets