5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25 echo "usage: sotruss [-F:-T:-o:-f] utility [utility arguments]"
26 echo " -F <bindfromlist>"
27 echo " A colon seperated list of libraries that are to be"
28 echo " traced. Only calls from these libraries will be"
29 echo " traced. The default is to trace calls from the"
30 echo " main executable."
31 echo " -T <bindtolist>"
32 echo " A colon seperated list of libraries that are to be"
33 echo " traced. Only calls to these libraries will be"
34 echo " traced. The default is to trace all calls."
35 echo " -o <outputfile>"
36 echo " sotruss output will be directed to 'outputfile'."
37 echo " by default it is placed on stdout."
39 echo " Follow all children created by fork() and also"
40 echo " print truss output for the children. This also"
41 echo " causes a 'pid' to be added to each truss output line."
48 trusslib32
="/usr/lib/link_audit/32/truss.so.1"
49 trusslib64
="/usr/lib/link_audit/64/truss.so.1"
55 if [[ $# -lt 1 ]]; then
60 while getopts $optlet c
91 shift `expr $OPTIND - 1`
94 # Build environment variables
97 TRUSS_BINDTO
="$bindto" \
98 TRUSS_BINDFROM
="$bindfrom" \
99 TRUSS_OUTPUT
="$outfile" \
100 TRUSS_PID
="$pidopt" \
101 TRUSS_NOINDENT
="$noindentopt" \
102 TRUSS_NOEXIT
="$noexitopt" \
103 LD_AUDIT_32
="$trusslib32" \
104 LD_AUDIT_64
="$trusslib64" \