Thursday, 28 October 2010

Diagnosing linux problems using strace....

from : http://www.serverwatch.com/tutorials/article.php/3909856/Using-Strace-to-Trace-Problems.htm

Using Strace to Trace Problems

October 25, 2010
By Joe Brockmeier

Having trouble figuring out why Apache isn't starting, or another program is crashing and burning, and the logfiles are giving no clue? Time to reach for strace.

What's strace? The strace utility is used to run a command and display its system calls, so you can see exactly what the program is doing until it exits. Experienced users can work with strace to do performance testing and so on, but even beginners can use strace as a diagnostic tool to see why a program is crashing.

Here's what you do. First, simply start your application or service using Strace, like so:

strace commandname

No comments: