Skip to content

Instantly share code, notes, and snippets.

@jonathanhle
Forked from shaikhul/strace.md
Created September 5, 2022 02:46
Show Gist options
  • Save jonathanhle/5cd82605cce2da3eabbb1bf487f1cb31 to your computer and use it in GitHub Desktop.
Save jonathanhle/5cd82605cce2da3eabbb1bf487f1cb31 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