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