Skip to content

Instantly share code, notes, and snippets.

@desyncr
Forked from bradurani/strace_tips.txt
Created September 19, 2018 01:34
Show Gist options
  • Save desyncr/5359704b00f70ba5ecf0f562b0275437 to your computer and use it in GitHub Desktop.
Save desyncr/5359704b00f70ba5ecf0f562b0275437 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