Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I trace strace -c errors? [closed]

How can trace the errors in the list that is generated by the strace -c command and can some on help me so that i can fix them. logs:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 30.95    0.000173           6        30           mmap
 26.83    0.000150           7        23        12 open
 12.70    0.000071           4        20           mprotect
  8.05    0.000045           5         9           read
  6.98    0.000039           3        13           close
  6.98    0.000039           3        12           fstat
  3.04    0.000017           3         6         3 stat
  1.43    0.000008           8         1         1 access
  1.43    0.000008           8         1           execve
  0.89    0.000005           2         3           brk
  0.72    0.000004           4         1           arch_prctl
  0.00    0.000000           0         1           write
  0.00    0.000000           0         1           lstat
  0.00    0.000000           0         2           munmap
  0.00    0.000000           0         2           rt_sigaction
  0.00    0.000000           0         1           rt_sigprocmask
  0.00    0.000000           0         2           ioctl
  0.00    0.000000           0         1           getrlimit
  0.00    0.000000           0         2           statfs
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         1           set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00    0.000559                   133        16 total
like image 444
Rsvay Avatar asked May 15 '26 01:05

Rsvay


1 Answers

You have errors with open, stat and access, right?

So run strace with you program again but get full information. Instead strace -c use strace -v. Find errors and see what files their cause.

Again, run you prog like this: strace -v -o calls.txt -e open,stat,access your-prog