Troubleshooting with strace
Best Practices for System Tracing
To get the most out of system tracing, keep the following best practices in mind when using strace:
- Filter what you trace. Use
-e trace=...to focus on relevant system calls. - Follow child processes. Use
-fto trace across process boundaries. - Control output verbosity. Use
-vfor more details or-e abbrev=...to reduce output. - Save output for analysis. Use
-o file.txtto save traces for later review. - Consider performance impacts. Tracing adds overhead; be careful on production systems.
- Combine with other tools. Use
dmesg, logs, and other diagnostics alongside tracing.
Conclusion
System tracing with tools like strace provides visibility into the critical interface between applications and the Linux kernel. As you have seen in these four scenarios, this visibility can help diagnose a wide range of issues – from missing files to memory problems, from crashes to performance bottlenecks.
By understanding the system calls your applications make, you gain insights that would be difficult or impossible to obtain through other means. This knowledge allows you to solve problems more efficiently and design more robust, performant software.
The next time you face a mysterious Linux issue, remember to reach for strace and its tracing cousins. The system call interface reveals the truth about what's really happening in your system.
Infos
- strace man page: https://man7.orghttp:///linux/man-pages/man1/strace.1.html
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Valve Announces Pending Release of Steam Machine
Shout it to the heavens: Steam Machine, powered by Linux, is set to arrive in 2026.
-
Happy Birthday, ADMIN Magazine!
ADMIN is celebrating its 15th anniversary with issue #90.
-
Another Linux Malware Discovered
Russian hackers use Hyper-V to hide malware within Linux virtual machines.
-
TUXEDO Computers Announces a New InfinityBook
TUXEDO Computers is at it again with a new InfinityBook that will meet your professional and gaming needs.
-
SUSE Dives into the Agentic AI Pool
SUSE becomes the first open source company to adopt agentic AI with SUSE Enterprise Linux 16.
-
Linux Now Runs Most Windows Games
The latest data shows that nearly 90 percent of Windows games can be played on Linux.
-
Fedora 43 Has Finally Landed
The Fedora Linux developers have announced their latest release, Fedora 43.
-
KDE Unleashes Plasma 6.5
The Plasma 6.5 desktop environment is now available with new features, improvements, and the usual bug fixes.
-
Xubuntu Site Possibly Hacked
It appears that the Xubuntu site was hacked and briefly served up a malicious ZIP file from its download page.
-
LMDE 7 Now Available
Linux Mint Debian Edition, version 7, has been officially released and is based on upstream Debian.

