Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 721 — #747
i
i
i
i
i
i
i
i
28
System Monitoring Utilities
open("/lib/libacl.so.1", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/lib/libpthread.so.0", O_RDONLY) = 3
open("/lib/libattr.so.1", O_RDONLY) = 3
To trace all the child processes, use the parameter -f. The behavior and
output format of strace can be largely controlled. For information, see man
strace.
28.15 Library Calls of a Program Run:
ltrace
The command ltrace enables you to trace the library calls of a process.
This command is used in a similar fashion to strace. The parameter -c
outputs the number and duration of the library calls that have occurred:
$ strace -c find /usr/share/doc
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
86.27 1.071814 30 35327 write
10.15 0.126092 38 3297 getdents64
2.33 0.028931 3 10208 lstat64
0.55 0.006861 2 3122 1 chdir
0.39 0.004890 3 1567 2 open
[...]
0.00 0.000003 3 1 uname
0.00 0.000001 1 1 time
------ ----------- ----------- --------- --------- ----------------
100.00 1.242403 58269 3 total
721
SUSE LINUX Enterprise Server










