Troubleshooting with strace
The Tracer

© Photo by Marc Sendra Martorell on Unsplash
The strace command-line utility helps you diagnose complex problems by revealing details about the interaction between applications and the Linux kernel.
Every Linux admin or developer has encountered mysterious problems: applications crashing without clear error messages, network connections failing unexpectedly, or system resources disappearing for no apparent reason. These issues can be frustrating and time-consuming to debug – unless you have the right tools. In these situations, system tracing is often the next step, which makes strace [1] one of the most valuable tools in a Linux professional's toolkit.
Tracing in Linux allows you to observe the system calls an application makes to the kernel, revealing the hidden interactions that occur beneath the surface of your code. In this article, I'll explore four scenarios that demonstrate how to get to the source of a problem with strace.
System Calls and Tracing
When a program executes, it frequently requests services from the kernel – those services could include file operations, network access, memory allocation, or any of the other services the kernel provides. These requests are made through system calls (syscalls). System calls are the interface between user applications and the kernel.
[...]
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
-
AerynOS Alpha Release Available
With a choice of several desktop environments, AerynOS 2025.08 is almost ready to be your next operating system.
-
AUR Repository Still Under DDoS Attack
Arch User Repository continues to be under a DDoS attack that has been going on for more than two weeks.
-
RingReaper Malware Poses Danger to Linux Systems
A new kind of malware exploits modern Linux kernels for I/O operations.
-
Happy Birthday, Linux
On August 25, Linux officially turns 34.
-
VirtualBox 7.2 Has Arrived
With early support for Linux kernel 6.17 and other new additions, VirtualBox 7.2 is a must-update for users.
-
Linux Mint 22.2 Beta Available for Testing
Some interesting new additions and improvements are coming to Linux Mint. Check out the Linux Mint 22.2 Beta to give it a test run.
-
Debian 13.0 Officially Released
After two years of development, the latest iteration of Debian is now available with plenty of under-the-hood improvements.
-
Upcoming Changes for MXLinux
MXLinux 25 has plenty in store to please all types of users.
-
A New Linux AI Assistant in Town
Newelle, a Linux AI assistant, works with different LLMs and includes document parsing and profiles.
-
Linux Kernel 6.16 Released with Minor Fixes
The latest Linux kernel doesn't really include any big-ticket features, just a lot of lines of code.