Now, there is a cute tool, strace, to help us diagnose where it crashes. strace can be binded on an existed PID, and trace its system calls. here are some useful arguments:
-f : trace current process and its sub-processes -o file : redirect the output into a file, but not stderr -p pid : bind on a process with pid, which is often used to debug on background.
Here is an example to trace the emacs process, the result will be written into the file emacs.strace.
strace -f -o emacs.strace emacs
Here is an advanced article to explain how strace to work: http://www.linuxforum.net/forum/showflat.php?Cat=&Board=security&Number=534712&page=0&view=collapsed&sb=5&o=31&fpart=
No comments:
Post a Comment