diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-03-14 14:10:41 +0100 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-03-14 14:10:41 +0100 |
commit | 3099cd5efceebcbbc5ab1202c2b183ccd4453a65 (patch) | |
tree | 966e24e1226e8e3b2f279cd651c13b6776537a9a /src/strace.md | |
parent | c5dfa4b329e9db6c68a6f5da77b7150f674206ef (diff) | |
download | notes-3099cd5efceebcbbc5ab1202c2b183ccd4453a65.tar.gz notes-3099cd5efceebcbbc5ab1202c2b183ccd4453a65.zip |
split debug.txt into mdbook chapters
Diffstat (limited to 'src/strace.md')
-rw-r--r-- | src/strace.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/strace.md b/src/strace.md new file mode 100644 index 0000000..ff0f9d3 --- /dev/null +++ b/src/strace.md @@ -0,0 +1,32 @@ +# strace(1) + +```markdown +strace [opts] [prg] + -f .......... follow child processes on fork(2) + -p <pid> .... attach to running process + -s <size> ... max string size (default: 32) + -e <expr> ... expression for trace filtering + -o <file> ... log output into <file> + -c .......... dump syscall statitics at the end +``` + +```markdown +<expr>: + trace=syscall[,syscall] .... trace only syscall listed + trace=file ................. trace all syscall that take a filename as arg + trace=process .............. trace process management related syscalls + trace=signal ............... trace signal related syscalls + signal ..................... trace signals delivered to the process +``` + +# Examples + +Trace `'open & socket` syscalls for a running process + childs. +```markdown +strace -f -p <pid> -e trace=open,socket +``` + +Trace signals delivered to a running process. +```markdown +strace -f -p <pid> -e signal +``` |