Strace
|
⇤ ← Revision 1 as of 2006-05-01 21:44:34
Size: 865
Comment: Using strace
|
Size: 885
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
| strace -Ff -tt <program> <arguments> 2>&1 | tee strace.log | strace -Ff -tt <program> <arguments> 2>&1 | tee strace-<program>.log |
| Line 14: | Line 14: |
| 1. Attach the complete output from strace, contained in strace.log, in your bug report. | 1. Attach the complete output from strace, contained in strace-<program>.log, in your bug report. |
Sometimes, a program starts behaving errantly. It gives incorrect output on its input, it doesn't print anything at all, or even hangs. Under a Linux-based system, every userspace process has to interact with its environment through the kernel. And it does this by invoking system calls.
Strace is a utility that intercepts and logs these system calls. In this way, you can watch how a program interacts with the system, which is useful for tracking down behavioural issues.
Generation
Make sure strace is installed.
apt-get install strace
Start the program under control of strace:
strace -Ff -tt <program> <arguments> 2>&1 | tee strace-<program>.log
- The program will start. Perform any actions necessary to reproduce the crash
Attach the complete output from strace, contained in strace-<program>.log, in your bug report.
Strace (last edited 2008-08-06 17:00:03 by localhost)