strace is a diagnostic, debugging and instructional userspace utility for Linux.
It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state.
System administrators, diagnosticians and trouble-shooters will find it invaluable for solving problems with programs for which the source is not readily available since they do not need to be recompiled in order to trace them.
Key Features
- Specifying a filter of syscall names that should be traced (via the -e trace= option): by name, like clone,fork,vfork; using one of the predefined groups, like %ipc or %file; or using regular expression syntax, like -e trace=/clock_.*.
- Specifying a list of paths to be traced (-P /etc/ld.so.cache, for example).
- Specifying a list of file descriptors whose I/O should be dumped (-e read= and -e write= options).
- Counting syscall execution time and count (-T, -c, -C, and -w options).
- Printing relative or absolute time stamps (-t and -r options).
- Modifying return and error code of the specified syscalls, and inject signals upon their execution (since strace 4.15, -e inject= option).
- Extracting information about file descriptors (including sockets, -y option).
- Printing stack traces, including (since strace 4.21) symbol demangling (-k option).
- Filtering by syscall return status (-e status= option; since strace 5.2).
Website: strace.io
Support: GitHub Code Repository, GitLab Code Repository
Developer: Dmitry Levin
License: GNU Lesser General Public License v2.1
strace is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Debuggers | |
|---|---|
| LLDB | Next generation, high-performance debugger |
| Ghidra | Software reverse engineering framework |
| Delve | Source level debugger for the Go programming language |
| GDB | The GNU Debugger |
| Valgrind | A memory debugger and profiler |
| Radare2 | Portable reversing framework |
| BugStalker | Rust debugger |
| Xdebug | Extension for PHP to aid debugging and development |
| Seer | GUI frontend to GDB |
| iaito | Graphical interface for radare2 |
| React Native Debugger | Standalone app for debugging React Native apps |
| KDbg | Graphical user interface to GDB |
| strace | Diagnostic, debugging and instructional userspace utility |
| rr | Record-and-replay debugger |
| drgn | Programmable debugger that puts scripting at the centre |
| cgdb | Lightweight console frontend to the GNU debugger |
| PuDB | Console-based visual debugger for Python |
| nnd | Partially inspired by RemedyBG |
| bashdb | Source-code debugger for bash; follows the GDB command syntax |
| Sysprof | Profile an application or entire system |
| crash | Linux kernel crash analysis utility |
| Nemiver | Standalone graphical debugger for GNOME |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

