xref: /netbsd/usr.sbin/trpt/trpt.8 (revision aba777d8)
1.\"	$NetBSD: trpt.8,v 1.9 1997/07/23 08:39:33 thorpej Exp $
2.\"
3.\" Copyright (c) 1983, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"     @(#)trpt.8	8.2 (Berkeley) 12/11/93
35.\"
36.Dd December 11, 1993
37.Dt TRPT 8
38.Os BSD 4.2
39.Sh NAME
40.Nm trpt
41.Nd transliterate protocol trace
42.Sh SYNOPSIS
43.Nm trpt
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.Op Fl N Ar system
51.Op Fl M Ar core
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.It Fl M Ar core
96Extract values associated with the name list from
97.Pa core
98instead of the default
99.Pa /dev/kmem .
100.It Fl N Ar system
101Extract the name list from
102.Pa system
103instead of the default
104.Pa /netbsd .
105.El
106.Pp
107The recommended use of
108.Nm trpt
109is as follows.
110Isolate the problem and enable debugging on the
111socket(s) involved in the connection.
112Find the address of the protocol control blocks
113associated with the sockets using the
114.Fl A
115option to
116.Xr netstat 1 .
117Then run
118.Nm trpt
119with the
120.Fl p
121option, supplying the associated
122protocol control block addresses.
123The
124.Fl f
125option can be used to follow the trace log once the trace is located.
126If there are
127many sockets using the debugging option, the
128.Fl j
129option may be useful in checking to see if
130any trace records are present for the socket in
131question.
132.Sh FILES
133.Bl -tag -width /dev/kmem -compact
134.It Pa /dev/kmem
135default kernel memory
136.It Pa /netbsd
137default system namelist
138.El
139.Sh SEE ALSO
140.Xr netstat 1 ,
141.Xr setsockopt 2 ,
142.Xr trsp 8
143.Sh DIAGNOSTICS
144.Bl -tag -width Ds
145.It Sy no namelist
146When the system image doesn't
147contain the proper symbols to find the trace buffer;
148others which should be self explanatory.
149.El
150.Sh BUGS
151Should also print the data for each input or output,
152but this is not saved in the trace record.
153.Pp
154The output format is inscrutable and should be described
155here.
156.Sh HISTORY
157The
158.Nm
159command appeared in
160.Bx 4.2 .
161