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