strace

Table of Contents

Trace a program

strace -s 2000 -f ./program

Trace a running, real-world process

$ sudo strace -o /tmp/strace.out -s 2000  -fp pid

count the system calls

use the “-c” flag to tell strace to count the system calls it observes

sudo strace -c -p pid

time the execution of each system call

use “-T” flag to ask it to time the execution of each system call during tracing

$ strace -T ./program

Author: Shi Shougang

Created: 2016-01-27 Wed 22:34

Emacs 24.3.1 (Org mode 8.2.10)

Validate