'\" te .\" Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. .TH sotruss 1 "23 April 2014" "SunOS 5.11" "User Commands" .SH NAME sotruss \- trace shared library procedure calls .SH SYNOPSIS .LP .nf \fB/usr/bin/sotruss\fR [\fB-f\fR] [\fB-F\fR \fIbindfromlist\fR] [\fB-T\fR \fIbindtolist\fR] [\fB-o\fR \fIoutputfile\fR] executable [executable arguments...] .fi .SH DESCRIPTION .sp .LP \fBsotruss\fR executes the specified command and produces a trace of the library calls that it performs. Each line of the trace output reports what bindings are occurring between dynamic objects as each procedure call is executed. \fBsotruss\fR traces all of the procedure calls that occur between dynamic objects via the \fIProcedure Linkage Table\fR, so only those procedure calls which are bound via the \fIProcedure\fR \fILinkage\fR \fITable\fR will be traced. See \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR. .SH OPTIONS .sp .ne 2 .mk .na \fB\fB-F\fR \fIbindfromlist\fR\fR .ad .RS 19n .rt A colon-separated list of libraries that are to be traced. Only calls from these libraries will be traced. The default is to trace calls from the main executable only. .RE .sp .ne 2 .mk .na \fB\fB-T\fR \fIbindtolist\fR\fR .ad .RS 19n .rt A colon-separated list of libraries that are to be traced. Only calls to these libraries will be traced. The default is to trace all calls. .RE .sp .ne 2 .mk .na \fB\fB-o\fR \fIoutputfile\fR\fR .ad .RS 19n .rt \fBsotruss\fR output will be directed to the \fIoutputfile\fR. If this option is combined with the \fB-f\fR option then the \fIpid\fR of the executing program will be placed at the end of the filename. By default \fBsotruss\fR output is placed on \fBstderr\fR. .RE .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .RS 19n .rt Follow all children created by \fBfork()\fR and print \fBtruss\fR output on each child process. This option will also cause a \fIpid\fR to be output on each \fBtruss\fR output line. .RE .SH EXAMPLES .LP \fBExample 1 \fRAn example of \fBsotruss\fR. .sp .LP A simple example shows the tracing of a simple \fBls\fR command: .sp .in +2 .nf % \fBsotruss ls\fR ls -> libc.so.1:*atexit(0xef7d7d1c, 0x23c00, 0x0) ls -> libc.so.1:*atexit(0x1392c, 0xef7d7d1c, 0xef621bb0) ls -> libc.so.1:*setlocale(0x6, 0x1396c, 0xef621ba8) ls -> libc.so.1:*textdomain(0x13970, 0x1396c, 0xef621ba8) ls -> libc.so.1:*time(0x0, 0xef61f6fc, 0xef621ba8) ls -> libc.so.1:*isatty(0x1, 0xef61f6fc, 0x0) ls -> libc.so.1:*getopt(0x1, 0xeffff8fc, 0x13980) ls -> libc.so.1:*malloc(0x100, 0x0, 0x0) ls -> libc.so.1:*malloc(0x9000, 0x0, 0x0) ls -> libc.so.1:*lstat64(0x23ee8, 0xeffff7a0, 0x0) \&... ls -> libc.so.1:*printf(0x13a64, 0x26208, 0x23ef0) ls -> libc.so.1:*printf(0x13a64, 0x26448, 0x23ef0) ls -> libc.so.1:*exit(0x0, 0x24220, 0x2421c) .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitydeveloper/base-developer-utilities .TE .SH SEE ALSO .sp .LP \fBld.so.1\fR(1), \fBtruss\fR(1), \fBwhocalls\fR(1), \fBfork\fR(2), \fBattributes\fR(5) .sp .LP \fIOracle Solaris 11.3 Linkers and Libraries Guide\fR