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