Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Linux Server Troubleshooting With strace

Nov 22, 2010, 18:03 (1 Talkback[s])
(Other stories by Juliet Kemp)

"strace is a useful little utility – installed by default on most Linux systems – which allows you to find out what a program is doing under the hood by tracing the system calls it's making. strace is a great basic debugging tool; but it's also fascinating to use even when you're not tracing a problem. It can teach you a lot about how a Linux program works.

"A system call is a message from the program to the kernel. User programs on a modern system run in a little sandbox: they're not permitted to interact directly with the computer (so you can't just shove numbers directly into registers to do things, as you could back in the day). Instead, every time the program needs to interact with the rest of the system, it sends a request (a system call) to the kernel. strace tracks these messages. Do remember, then, that if you don't see any strace output for a while, it doesn't necessarily mean that your program is stuck. It might just be doing something within its own sandbox that doesn't require any communication with the rest of the system."

Complete Story

Related Stories: