(Created page with '== Strace == Strace is a useful diagnostic, instructional, and debugging tool. System administrators, diagnosticians and trouble-shooters will find it invaluable for solving pr...') |
No edit summary |
||
Line 2: | Line 2: | ||
Strace is a useful diagnostic, instructional, and debugging tool. 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. Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and signals are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions. | Strace is a useful diagnostic, instructional, and debugging tool. 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. Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and signals are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions. | ||
# TODO create examples samples starting with simple usage to complex | |||
== Example Usage == | |||
To strace a command | |||
<pre> | |||
strace <command> | |||
</pre> | |||
To strace a command and put the output to a file | |||
<pre> | |||
strace -o </tmp/strace-<command>-ouput.txt> <command> | |||
</pre> |
Revision as of 10:35, 17 December 2010
Strace
Strace is a useful diagnostic, instructional, and debugging tool. 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. Students, hackers and the overly-curious will find that a great deal can be learned about a system and its system calls by tracing even ordinary programs. And programmers will find that since system calls and signals are events that happen at the user/kernel interface, a close examination of this boundary is very useful for bug isolation, sanity checking and attempting to capture race conditions.
- TODO create examples samples starting with simple usage to complex
Example Usage
To strace a command
strace <command>
To strace a command and put the output to a file
strace -o </tmp/strace-<command>-ouput.txt> <command>