70cd0841336ed9772e347338663931234907301a
[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 .\" $DragonFly: src/usr.sbin/trpt/trpt.8,v 1.2 2003/06/17 04:30:03 dillon Exp $
35 .\"
36 .Dd December 11, 1993
37 .Dt TRPT 8
38 .Os
39 .Sh NAME
40 .Nm trpt
41 .Nd transliterate protocol trace
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl a
45 .Op Fl f
46 .Op Fl j
47 .Op Fl p Ar hex-address
48 .Op Fl s
49 .Op Fl t
50 .Oo
51 .Ar system Op Ar core
52 .Oc
53 .Sh DESCRIPTION
54 The
55 .Nm
56 utility interrogates the buffer of
57 .Tn TCP
58 trace records created
59 when a socket is marked for
60 .Dq debugging
61 (see
62 .Xr setsockopt 2 ) ,
63 and prints a readable description of these records.
64 When no options are supplied,
65 .Nm
66 prints all the trace records found in the system
67 grouped according to
68 .Tn TCP
69 connection protocol control
70 block
71 .Pq Tn PCB .
72 .Pp
73 The following options may be used to
74 alter this behavior:
75 .Bl -tag -width indent
76 .It Fl a
77 In addition to the normal output,
78 print the values of the source and destination
79 addresses for each packet recorded.
80 .It Fl f
81 Follow the trace as it occurs, waiting a short time for additional records
82 each time the end of the log is reached.
83 .It Fl j
84 Just give a list of the protocol control block
85 addresses for which there are trace records.
86 .It Fl p
87 Show only trace records associated with the protocol
88 control block at the given address
89 .Ar hex-address .
90 .It Fl s
91 In addition to the normal output,
92 print a detailed description of the packet
93 sequencing information.
94 .It Fl t
95 In addition to the normal output,
96 print the values for all timers at each
97 point in the trace.
98 .El
99 .Pp
100 The recommended use of
101 .Nm
102 is as follows.
103 Isolate the problem and enable debugging on the
104 socket(s) involved in the connection.
105 Find the address of the protocol control blocks
106 associated with the sockets using the
107 .Fl A
108 option to
109 .Xr netstat 1 .
110 Then run
111 .Nm
112 with the
113 .Fl p
114 option, supplying the associated
115 protocol control block addresses.
116 The
117 .Fl f
118 option can be used to follow the trace log once the trace is located.
119 If there are
120 many sockets using the debugging option, the
121 .Fl j
122 option may be useful in checking to see if
123 any trace records are present for the socket in
124 question.
125 .Pp
126 If debugging is being performed on a system or
127 core file other than the default, the last two
128 arguments may be used to supplant the defaults.
129 .Sh FILES
130 .Bl -tag -width /dev/kmem -compact
131 .It Pa /kernel
132 .It Pa /dev/kmem
133 .El
134 .Sh SEE ALSO
135 .Xr netstat 1 ,
136 .Xr setsockopt 2
137 .Sh DIAGNOSTICS
138 .Bl -diag
139 .It no namelist
140 When the system image doesn't
141 contain the proper symbols to find the trace buffer;
142 others which should be self explanatory.
143 .El
144 .Sh BUGS
145 Should also print the data for each input or output,
146 but this is not saved in the trace record.
147 .Pp
148 The output format is inscrutable and should be described
149 here.
150 .Sh HISTORY
151 The
152 .Nm
153 utility appeared in
154 .Bx 4.2 .