Skip to content

Instantly share code, notes, and snippets.

@shaikhul
Last active September 5, 2022 02:46
Show Gist options
  • Save shaikhul/b3f69462384c7f616567034f0e881e19 to your computer and use it in GitHub Desktop.
Save shaikhul/b3f69462384c7f616567034f0e881e19 to your computer and use it in GitHub Desktop.
Strace cheat sheet

Strace cheat sheet

  • trace an executable: strace ls
  • trace specific system call: strace -e open ls
  • trace multiple system call: strace -e trace=open,read,write ls
  • save trace output: strace -o ls.txt ls
  • trace a running linux process: sudo strace -p pid
  • print timestamp: strace -t ls
  • gerate stat: strace -c ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment