Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / trpt / trpt.8
1 .\" Copyright (c) 1983, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)trpt.8      8.2 (Berkeley) 12/11/93
33 .\" $FreeBSD: src/usr.sbin/trpt/trpt.8,v 1.8.2.5 2003/03/11 22:31:34 trhodes Exp $
34 .\"
35 .Dd December 11, 1993
36 .Dt TRPT 8
37 .Os
38 .Sh NAME
39 .Nm trpt
40 .Nd transliterate protocol trace
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl a
44 .Op Fl f
45 .Op Fl j
46 .Op Fl p Ar hex-address
47 .Op Fl s
48 .Op Fl t
49 .Oo
50 .Ar system Op Ar core
51 .Oc
52 .Sh DESCRIPTION
53 The
54 .Nm
55 utility interrogates the buffer of
56 .Tn TCP
57 trace records created
58 when a socket is marked for
59 .Dq debugging
60 (see
61 .Xr setsockopt 2 ) ,
62 and prints a readable description of these records.
63 When no options are supplied,
64 .Nm
65 prints all the trace records found in the system
66 grouped according to
67 .Tn TCP
68 connection protocol control
69 block
70 .Pq Tn PCB .
71 .Pp
72 The following options may be used to
73 alter this behavior:
74 .Bl -tag -width indent
75 .It Fl a
76 In addition to the normal output,
77 print the values of the source and destination
78 addresses for each packet recorded.
79 .It Fl f
80 Follow the trace as it occurs, waiting a short time for additional records
81 each time the end of the log is reached.
82 .It Fl j
83 Just give a list of the protocol control block
84 addresses for which there are trace records.
85 .It Fl p
86 Show only trace records associated with the protocol
87 control block at the given address
88 .Ar hex-address .
89 .It Fl s
90 In addition to the normal output,
91 print a detailed description of the packet
92 sequencing information.
93 .It Fl t
94 In addition to the normal output,
95 print the values for all timers at each
96 point in the trace.
97 .El
98 .Pp
99 The recommended use of
100 .Nm
101 is as follows.
102 Isolate the problem and enable debugging on the
103 socket(s) involved in the connection.
104 Find the address of the protocol control blocks
105 associated with the sockets using the
106 .Fl A
107 option to
108 .Xr netstat 1 .
109 Then run
110 .Nm
111 with the
112 .Fl p
113 option, supplying the associated
114 protocol control block addresses.
115 The
116 .Fl f
117 option can be used to follow the trace log once the trace is located.
118 If there are
119 many sockets using the debugging option, the
120 .Fl j
121 option may be useful in checking to see if
122 any trace records are present for the socket in
123 question.
124 .Pp
125 If debugging is being performed on a system or
126 core file other than the default, the last two
127 arguments may be used to supplant the defaults.
128 .Sh FILES
129 .Bl -tag -width /dev/kmem -compact
130 .It Pa /kernel
131 .It Pa /dev/kmem
132 .El
133 .Sh SEE ALSO
134 .Xr netstat 1 ,
135 .Xr setsockopt 2
136 .Sh DIAGNOSTICS
137 .Bl -diag
138 .It no namelist
139 When the system image doesn't
140 contain the proper symbols to find the trace buffer;
141 others which should be self explanatory.
142 .El
143 .Sh BUGS
144 Should also print the data for each input or output,
145 but this is not saved in the trace record.
146 .Pp
147 The output format is inscrutable and should be described
148 here.
149 .Sh HISTORY
150 The
151 .Nm
152 utility appeared in
153 .Bx 4.2 .