Wednesday, December 23, 2015

Linux : strace

# strace -c dd if=/dev/zero of=/dev/null bs=1k count=5000k
5120000+0 records in
5120000+0 records out
5242880000 bytes (5.2 GB) copied, 326.409 s, 16.1 MB/s
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 51.24    0.596842           0   5120005           read
 48.76    0.567913           0   5120003           write
  0.00    0.000022           2        12           close
  0.00    0.000017           2         7           mprotect
  0.00    0.000000           0        14         5 open
  0.00    0.000000           0         7           fstat
  0.00    0.000000           0         1           lseek
  0.00    0.000000           0        16           mmap
  0.00    0.000000           0         2           munmap
  0.00    0.000000           0         3           brk
  0.00    0.000000           0         6           rt_sigaction
  0.00    0.000000           0         1           rt_sigprocmask
  0.00    0.000000           0         1         1 access
  0.00    0.000000           0         2           dup2
  0.00    0.000000           0         1           execve
  0.00    0.000000           0         1           getrlimit
  0.00    0.000000           0         1           arch_prctl
  0.00    0.000000           0         2         1 futex
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         1           set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00    1.164794              10240087         7 total


time : percentage of CPU time spent
usecs/call : average system CPU time per call in microseconds
calls : number of system calls
syscall: system call name

No comments:

Post a Comment