Strace: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
System Trace is a tool for hackers.
System Trace is a tool for hackers.


Say you have some python application such as [[Reposurgeon]] that you need to understand better.  You can attach <code>strace</code> to the <code><abbrev title="process id">pid</abbrev></code> of the running application to see the underlying system calls being made.
Say you have some python application such as [[Reposurgeon]] that you need to understand better.  You can attach <code>strace</code> to the <code><abbr title="process id">pid</abbr></code> of the running application to see the underlying system calls being made.
<source lang="bash">
<source lang="bash">
sudo strace -f -s128 -e trace=open -p$(ps -o lwp= -LC python2 | tail -1)
sudo strace -f -s128 -e trace=open -p$(ps -o lwp= -LC python2 | tail -1)