Skip to content

Instantly share code, notes, and snippets.

@bradurani
Created September 21, 2016 07:14
Show Gist options
  • Save bradurani/0268d851ef81d081d0ebe1757cf0d000 to your computer and use it in GitHub Desktop.
Save bradurani/0268d851ef81d081d0ebe1757cf0d000 to your computer and use it in GitHub Desktop.
strace -e pattern command #match pattern, don't pipe to grep because strace prints to stderr
strace -e open man cat 2> strace.txt #filter open calls and save to strace.txt (via stderr)
strace -p pid #attach to running process
strace -f #also strace child processes
strace -c #show histogram table of num calls
strace -f -e trace=network curl google.com #networrk calls (parent and child processes)
strace -f -e trace=network -s 100 curl google.com #limit string args to 100 chars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment