From 3099cd5efceebcbbc5ab1202c2b183ccd4453a65 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 14 Mar 2020 14:10:41 +0100 Subject: split debug.txt into mdbook chapters --- src/strace.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/strace.md (limited to 'src/strace.md') 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 .... attach to running process + -s ... max string size (default: 32) + -e ... expression for trace filtering + -o ... log output into + -c .......... dump syscall statitics at the end +``` + +```markdown +: + 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 -e trace=open,socket +``` + +Trace signals delivered to a running process. +```markdown +strace -f -p -e signal +``` -- cgit v1.2.3