Skip to content

Instantly share code, notes, and snippets.

@epcim
Last active January 3, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/52a4706a29af03bb815d8c28a59dd1f7 to your computer and use it in GitHub Desktop.
Save epcim/52a4706a29af03bb815d8c28a59dd1f7 to your computer and use it in GitHub Desktop.
strace debug
# http://www.thegeekstuff.com/2011/11/strace-examples/
strace -f -o /tmp/strace.log -s 2048 -p 1 & systemctl restart postgresql.service
#Then, after a couple of seconds, fg into the strace process, cancel it, and then
#see it the strace.log helps.
strace -e trace=open,read ls /home
strace $(pidof apache2 | sed 's/\([0-9]*\)/\-p \1/g')
strace -e trace=connect python resolv.py 2>&1 | grep 53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment