1sotruss(1)                       User Commands                      sotruss(1)
2
3
4

NAME

6       sotruss - trace shared library procedure calls
7

SYNOPSIS

9       /usr/bin/sotruss [-f] [-F bindfromlist] [-T bindtolist]
10            [-o outputfile] executable [executable arguments...]
11
12

DESCRIPTION

14       sotruss  executes  the  specified  command  and produces a trace of the
15       library calls that it performs. Each line of the trace  output  reports
16       what  bindings  are occurring between dynamic objects as each procedure
17       call is executed. sotruss traces all of the procedure calls that  occur
18       between  dynamic objects via the Procedure Linkage Table, so only those
19       procedure calls which are bound via the Procedure Linkage Table will be
20       traced. See Linker and Libraries Guide
21

OPTIONS

23       -F bindfromlist    A  colon-separated  list of libraries that are to be
24                          traced.  Only calls from  these  libraries  will  be
25                          traced.  The default is to trace calls from the main
26                          executable only.
27
28
29       -T bindtolist      A colon-separated list of libraries that are  to  be
30                          traced.  Only  calls  to  these  libraries  will  be
31                          traced.  The default is to trace all calls.
32
33
34       -o outputfile      sotruss output will be directed to  the  outputfile.
35                          If  this option is combined with the  -f option then
36                          the  pid of the executing program will be placed  at
37                          the  end  of the filename. By default sotruss output
38                          is placed on  stderr.
39
40
41       -f                 Follow all children created  by   fork()  and  print
42                          truss  output  on  each  child process.  This option
43                          will also cause a  pid to be output  on  each  truss
44                          output line.
45
46

EXAMPLES

48       Example 1 An example of sotruss.
49
50
51       A simple example shows the tracing of a simple ls command:
52
53
54         % sotruss ls | more
55         ls       ->     libc.so.1:*atexit(0xef7d7d1c, 0x23c00, 0x0)
56         ls       ->     libc.so.1:*atexit(0x1392c, 0xef7d7d1c, 0xef621bb0)
57         ls       ->     libc.so.1:*setlocale(0x6, 0x1396c, 0xef621ba8)
58         ls       ->     libc.so.1:*textdomain(0x13970, 0x1396c, 0xef621ba8)
59         ls       ->     libc.so.1:*time(0x0, 0xef61f6fc, 0xef621ba8)
60         ls       ->     libc.so.1:*isatty(0x1, 0xef61f6fc, 0x0)
61         ls       ->     libc.so.1:*getopt(0x1, 0xeffff8fc, 0x13980)
62         ls       ->     libc.so.1:*malloc(0x100, 0x0, 0x0)
63         ls       ->     libc.so.1:*malloc(0x9000, 0x0, 0x0)
64         ls       ->     libc.so.1:*lstat64(0x23ee8, 0xeffff7a0, 0x0)
65         ...
66         ls       ->     libc.so.1:*printf(0x13a64, 0x26208, 0x23ef0)
67         ls       ->     libc.so.1:*printf(0x13a64, 0x26448, 0x23ef0)
68         ls       ->     libc.so.1:*exit(0x0, 0x24220, 0x2421c)
69
70
71

ATTRIBUTES

73       See attributes(5) for descriptions of the following attributes:
74
75
76
77
78       ┌─────────────────────────────┬─────────────────────────────┐
79       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │Availability                 │SUNWtoo                      │
82       └─────────────────────────────┴─────────────────────────────┘
83

SEE ALSO

85       ld.so.1(1), truss(1), whocalls(1), fork(2), attributes(5)
86
87
88       Linker and Libraries Guide
89
90
91
92SunOS 5.11                        12 May 1997                       sotruss(1)
Impressum