diff --git a/cheatsheets/strace b/cheatsheets/strace new file mode 100644 index 0000000..8ae4b41 --- /dev/null +++ b/cheatsheets/strace @@ -0,0 +1,24 @@ +# Basic stracing +strace + +# save the trace to a file +strace -o strace.out + +# follow only the open() system call +strace -e trace=open + +# follow all the system calls which open a file +strace -e trace=file + +# follow all the system calls associated with process +# management +strace -e trace=process + +# follow child processes as they are created +strace -f + +# count time, calls and errors for each system call +strace -c + +# trace a running process (multiple PIDs can be specified) +strace -p \ No newline at end of file