truss is a new utility, provided to trace system calls performed, signals received, and machine faults incurred. It also has an option that enables entry and exit tracing of user-level function calls executed by the traced process. truss offers several significant improvements over the SunOS release 4 trace(1) command, including the ability to follow forked processes and to deal with multithreaded processes.
Also, the truss utility traces the system calls, signals, and machine faults of a process. It has been enhanced with a new option to enable entry and exit tracing of user-level function calls executed by the traced process.
The following example shows a summary of traced calls for the date command. With the -c option, truss does not display the trace line by line. Instead, it counts the system calls, signals, and faults, and displays a summary.
example% truss -c date
Fri Sep 18 14:31:30 PDT 1992
syscall seconds calls errors
_exit .00 1
read .00 7
write .00 1
open .03 12
close .00 12
time .00 1
brk .01 4
lseek .00 1
fstat .00 4
ioctl .00 1
execve .00 1
mmap .01 17
munmap .00 8
---- --- ---
sys totals: .05 70 0
usr time: .03
elapsed: .28
|
See the truss(1) man page for complete details on all truss options. There are a number of other Solaris 7 debugging tools based on proc(4) such as pmap(1).