xref: /illumos-gate/usr/src/man/man8/connstat.8 (revision 11845c32)
1a2f04351SSebastien Roy.\"
2a2f04351SSebastien Roy.\" CDDL HEADER START
3a2f04351SSebastien Roy.\"
4a2f04351SSebastien Roy.\" This file and its contents are supplied under the terms of the
5a2f04351SSebastien Roy.\" Common Development and Distribution License ("CDDL"), version 1.0.
6a2f04351SSebastien Roy.\" You may only use this file in accordance with the terms of version
7a2f04351SSebastien Roy.\" 1.0 of the CDDL.
8a2f04351SSebastien Roy.\"
9a2f04351SSebastien Roy.\" A full copy of the text of the CDDL should have accompanied this
10a2f04351SSebastien Roy.\" source.  A copy of the CDDL is also available via the Internet at
11a2f04351SSebastien Roy.\" http://www.illumos.org/license/CDDL.
12a2f04351SSebastien Roy.\"
13a2f04351SSebastien Roy.\" CDDL HEADER END
14a2f04351SSebastien Roy.\"
15a2f04351SSebastien Roy.\"
16a2f04351SSebastien Roy.\" Copyright (c) 2016 by Delphix. All rights reserved.
17a2f04351SSebastien Roy.\"
18*11845c32SPeter Tribble.Dd March 10, 2023
19bbf21555SRichard Lowe.Dt CONNSTAT 8
20a2f04351SSebastien Roy.Os
21a2f04351SSebastien Roy.Sh NAME
22a2f04351SSebastien Roy.Nm connstat
23a2f04351SSebastien Roy.Nd report TCP connection statistics
24a2f04351SSebastien Roy.Sh SYNOPSIS
25a2f04351SSebastien Roy.Nm
26a2f04351SSebastien Roy.Op Fl eLP
27a2f04351SSebastien Roy.Op Fl 4 Ns | Ns Fl 6
28a2f04351SSebastien Roy.Op Fl T Sy d Ns | Ns Sy u
29a2f04351SSebastien Roy.Op Fl F Ar filter
30a2f04351SSebastien Roy.Op Fl i Ar interval
31a2f04351SSebastien Roy.Op Fl c Ar count
32a2f04351SSebastien Roy.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
33a2f04351SSebastien Roy.Sh DESCRIPTION
34a2f04351SSebastien RoyThe
35a2f04351SSebastien Roy.Nm
36a2f04351SSebastien Roycommand reports TCP connection statistics in tabular form.
37a2f04351SSebastien RoyEach row of the table represents the activity of one connection.
38a2f04351SSebastien RoyThe
39a2f04351SSebastien Roy.Nm
40a2f04351SSebastien Roycommand adds virtually no overhead to run as it is aggregating statistics that
41a2f04351SSebastien Royare always collected in the kernel.
42a2f04351SSebastien Roy.Pp
43a2f04351SSebastien RoyWith no arguments,
44a2f04351SSebastien Roy.Nm
45a2f04351SSebastien Royprints a single report containing all TCP connections, and includes a basic
46a2f04351SSebastien Royset of fields representing IP address and port information, as well as connection
47a2f04351SSebastien Roystate.
48a2f04351SSebastien RoyThe
49a2f04351SSebastien Roy.Fl o
50a2f04351SSebastien Royflag can be used to specify which fields to display, and other arguments to
51a2f04351SSebastien Royfilter the set of connections included in the output.
52a2f04351SSebastien Roy.Sh OPTIONS
53a2f04351SSebastien RoyThe arguments are as follows:
54a2f04351SSebastien Roy.Bl -tag -width ""
55a2f04351SSebastien Roy.It Fl 4 , Fl -ipv4
56a2f04351SSebastien RoyOnly displays IPv4 connections.
57a2f04351SSebastien Roy.It Fl 6 , Fl -ipv6
58a2f04351SSebastien RoyOnly displays IPv6 connections
59a2f04351SSebastien Roy.It Fl c Ar count , Fl -count Ns = Ns Ar count
60a2f04351SSebastien RoyPrint a specified number of reports before exiting.
61a2f04351SSebastien RoyThis is used in conjunction with
62a2f04351SSebastien Roy.Fl i .
63a2f04351SSebastien Roy.It Fl e , Fl -established
64a2f04351SSebastien RoyOnly display connections that are in state ESTABLISHED.
65a2f04351SSebastien RoyThis is equivalent to including
66a2f04351SSebastien Roy.Sy state=ESTABLISHED
67a2f04351SSebastien Royin the filter argument to the
68a2f04351SSebastien Roy.Fl F
69a2f04351SSebastien Royoption.
70a2f04351SSebastien Roy.It Fl F Ar filter , Fl -filter Ns = Ns Ar filter
71a2f04351SSebastien RoyOnly display connections that match the filter argument provided.
72a2f04351SSebastien RoyThe format of the filter is:
73a2f04351SSebastien Roy.Pp
74a2f04351SSebastien Roy.Ar field Ns = Ns Ar value Ns Oo , Ns Ar field Ns = Ns Ar value Oc Ns ...
75a2f04351SSebastien Roy.Pp
76a2f04351SSebastien RoyFields that can currently be filtered are
77a2f04351SSebastien Roy.Ar laddr , Ar lport , Ar raddr , Ar rport , and Ar state .
78a2f04351SSebastien RoySee the
79a2f04351SSebastien Roy.Sx Fields
80a2f04351SSebastien Roysection for a description of these fields.
81a2f04351SSebastien RoyThe filter matches a connection if all of the filter elements match, and a
82a2f04351SSebastien Royfield must only appears once in the filter.
83a2f04351SSebastien Roy.It Fl i Ar interval , Fl -interval Ns = Ns Ar interval
84a2f04351SSebastien RoySpecify an output interval in seconds.
85a2f04351SSebastien RoyFor each interval, a report containing all connections appropriate given other
86a2f04351SSebastien Roycommand-line options is printed.
87a2f04351SSebastien Roy.It Fl L , Fl -no-loopback
88a2f04351SSebastien RoyExclude connections to the loopback address.
89a2f04351SSebastien Roy.It Fl o Ar fields , Fl -output Ns = Ns Ar fields
90a2f04351SSebastien RoyRestrict the output to the specified comma-delimited list of field names.
91a2f04351SSebastien RoySee the
92a2f04351SSebastien Roy.Sx Fields
93a2f04351SSebastien Roysection for information about possible fields.
94a2f04351SSebastien Roy.It Fl P , Fl -parsable
95a2f04351SSebastien RoyDisplay using a stable, machine-parsable output format.
96a2f04351SSebastien RoyThe
97a2f04351SSebastien Roy.Fl o
98a2f04351SSebastien Royflag must also be given to specify which fields to output and their order.
99a2f04351SSebastien RoyEach line of output will consist of comma-delimited (,) fields,
100*11845c32SPeter Tribbleand no header will be emitted.
101a2f04351SSebastien RoyWhen also using the
102a2f04351SSebastien Roy.Fl T
103a2f04351SSebastien Royoption, lines indicating the current time will begin with
104a2f04351SSebastien Roy.Dq "= " .
105a2f04351SSebastien RoySee
106a2f04351SSebastien Roy.Sx Example 4
107a2f04351SSebastien Royfor an example of how to process parsable output.
108a2f04351SSebastien Roy.It Fl T Sy d Ns | Ns Sy u , Fl -timestamp Ns = Ns Sy d Ns | Ns Sy u
109a2f04351SSebastien RoyPrint a timestamp before each block of output.
110a2f04351SSebastien Roy.Pp
111a2f04351SSebastien RoySpecify
112a2f04351SSebastien Roy.Sy u
113a2f04351SSebastien Royfor a printed representation of the internal representation of time (see
114a2f04351SSebastien Roy.Xr time 2 Ns ).
115a2f04351SSebastien RoySpecify
116a2f04351SSebastien Roy.Sy d
117a2f04351SSebastien Royfor standard date format (see
118a2f04351SSebastien Roy.Xr date 1 Ns ).
119a2f04351SSebastien Roy.El
120a2f04351SSebastien Roy.Ss Fields
121a2f04351SSebastien RoyThe following fields are supported.
122a2f04351SSebastien RoyField names are case insensitive.
123a2f04351SSebastien RoyUnless otherwise indicated, the values of fields that represent a count (e.g.
124a2f04351SSebastien Roybytes or segments) are cumulative since the connection was established.
125a2f04351SSebastien RoySome of these fields refer to data segments, which are segments that contain
126a2f04351SSebastien Roynon-zero amount of data.
127a2f04351SSebastien RoyAll sizes are in bytes.
128a2f04351SSebastien Roy.Bl -tag -width "inunorderbytes"
129a2f04351SSebastien Roy.It Sy cwnd
130a2f04351SSebastien RoyThe size of the local TCP congestion window at this instant.
131a2f04351SSebastien Roy.It Sy inbytes
132a2f04351SSebastien RoyThe number of data bytes received.
133a2f04351SSebastien RoyThis does not include duplicate bytes received.
134a2f04351SSebastien Roy.It Sy insegs
135a2f04351SSebastien RoyThe number of data segments received.
136a2f04351SSebastien RoyThis does not include duplicate segments received.
137a2f04351SSebastien Roy.It Sy inunorderbytes
138a2f04351SSebastien RoyThe number of data bytes that were received out of order.
139a2f04351SSebastien Roy.It Sy inunordersegs
140a2f04351SSebastien RoyThe number of data segments that were received out of order.
141a2f04351SSebastien Roy.It Sy laddr
142a2f04351SSebastien RoyThe local IP address.
143a2f04351SSebastien Roy.It Sy lport
144a2f04351SSebastien RoyThe local TCP port.
145a2f04351SSebastien Roy.It Sy mss
146a2f04351SSebastien RoyThe maximum TCP segment size for this connection.
147a2f04351SSebastien Roy.It Sy outbytes
148a2f04351SSebastien RoyThe number of data bytes sent.
149a2f04351SSebastien RoyThis does not include retransmitted bytes counted by
150a2f04351SSebastien Roy.Sy retransbytes .
151a2f04351SSebastien Roy.It Sy outsegs
152a2f04351SSebastien RoyThe number of data segments sent.
153a2f04351SSebastien RoyThis does not include segments containing retransmitted bytes counted by
154a2f04351SSebastien Roy.Sy retranssegs .
155a2f04351SSebastien Roy.It Sy raddr
156a2f04351SSebastien RoyThe remote IP address.
157a2f04351SSebastien Roy.It Sy retransbytes
158a2f04351SSebastien RoyThe number of data bytes retransmitted.
159a2f04351SSebastien Roy.It Sy retranssegs
160a2f04351SSebastien RoyThe number of data segments sent that contained retransmitted bytes.
161a2f04351SSebastien Roy.It Sy rport
162a2f04351SSebastien RoyThe remote TCP port.
163a2f04351SSebastien Roy.It Sy rto
164a2f04351SSebastien RoyThe current retransmission timeout in milliseconds.
165a2f04351SSebastien Roy.It Sy rtt
166a2f04351SSebastien RoyThe current smoothed round-trip time to the peer in microseconds.
167a2f04351SSebastien RoyThe smoothed RTT average algorithm used is as described in RFC 6298.
168a2f04351SSebastien Roy.It Sy rttc
169a2f04351SSebastien RoyThe number of times that a round-trip sample was added to
170a2f04351SSebastien Roy.Sy rtts .
171a2f04351SSebastien RoySee
172a2f04351SSebastien Roy.Sy rtts
173a2f04351SSebastien Royfor a description of how these two fields can be used together to calculate the
174a2f04351SSebastien Royaverage round-trip over a given period.
175a2f04351SSebastien Roy.It Sy rtts
176a2f04351SSebastien RoyThe sum of all round-trip samples taken over the lifetime of the connection in
177a2f04351SSebastien Roymicroseconds.
178a2f04351SSebastien RoyEach time TCP updates the value of
179a2f04351SSebastien Roy.Sy rtt
180a2f04351SSebastien Roywith a new sample, that sample's value is added to
181a2f04351SSebastien Roy.Sy rtts .
182a2f04351SSebastien RoyTo calculate the average round-trip over a given period (e.g. between T1 and T2),
183a2f04351SSebastien Roytake samples of
184a2f04351SSebastien Roy.Sy rtts
185a2f04351SSebastien Royand
186a2f04351SSebastien Roy.Sy rttc
187a2f04351SSebastien Royat T1 and T2, and calculate
188a2f04351SSebastien Roy.br
189a2f04351SSebastien Roy((
190a2f04351SSebastien Roy.Sy rtts Ns
191a2f04351SSebastien Roy_T2 -
192a2f04351SSebastien Roy.Sy rtts Ns
193a2f04351SSebastien Roy_T1 ) / (
194a2f04351SSebastien Roy.Sy rttc Ns
195a2f04351SSebastien Roy_T2 -
196a2f04351SSebastien Roy.Sy rttc Ns
197a2f04351SSebastien Roy_T1 )).
198a2f04351SSebastien Roy.br
199a2f04351SSebastien RoySee
200a2f04351SSebastien Roy.Sx Example 4
201a2f04351SSebastien Royfor an example of how this can be done programmatically from a shell script.
202a2f04351SSebastien Roy.It Sy rwnd
203a2f04351SSebastien RoyThe size of the local TCP receive window at this instant.
204a2f04351SSebastien Roy.It Sy state
205a2f04351SSebastien RoyThe TCP connection state.
206a2f04351SSebastien RoyPossible values are:
207a2f04351SSebastien Roy.Bl -tag -width "SYN_RECEIVED"
208a2f04351SSebastien Roy.It Sy BOUND
209a2f04351SSebastien RoyBound, ready to connect or listen.
210a2f04351SSebastien Roy.It Sy CLOSED
211a2f04351SSebastien RoyClosed.
212a2f04351SSebastien RoyThe local endpoint (e.g. socket) is not being used.
213a2f04351SSebastien Roy.It Sy CLOSING
214a2f04351SSebastien RoyClosed, but still waiting for a termination acknowledgment from the peer.
215a2f04351SSebastien Roy.It Sy CLOSE_WAIT
216a2f04351SSebastien RoyThe peer has shutdown; waiting for the local endpoint to close.
217a2f04351SSebastien Roy.It Sy ESTABLISHED
218a2f04351SSebastien RoyConnection has been established and data can be transferred.
219a2f04351SSebastien Roy.It Sy FIN_WAIT_1
220a2f04351SSebastien RoyLocal endpoint is closed, but waiting for termination acknowledgment from the
221a2f04351SSebastien Roypeer.
222a2f04351SSebastien Roy.It Sy FIN_WAIT_2
223a2f04351SSebastien RoyLocal endpoint is closed, but waiting for a termination request from the peer.
224a2f04351SSebastien Roy.It Sy IDLE
225a2f04351SSebastien RoyThe local endpoint (e.g. socket) has been opened, but is not bound.
226a2f04351SSebastien Roy.It Sy LAST_ACK
227a2f04351SSebastien RoyThe remote endpoint has terminated, and the local endpoint has sent a termination
228a2f04351SSebastien Royrequest.
229a2f04351SSebastien RoyThe acknowledgment for this request has not been received.
230a2f04351SSebastien Roy.It Sy LISTEN
231a2f04351SSebastien RoyListening for incoming connections.
232a2f04351SSebastien Roy.It Sy SYN_RECEIVED
233a2f04351SSebastien RoyInitial connection request has been received and acknowledged, and a connection
234a2f04351SSebastien Royrequest has been sent but not yet acknowledged.
235a2f04351SSebastien Roy.It Sy SYN_SENT
236a2f04351SSebastien RoyA connection establishment request has been sent but not yet acknowledged.
237a2f04351SSebastien Roy.It Sy TIME_WAIT
238a2f04351SSebastien RoyWaiting for time to pass after having sent an acknowledgment for the peer's
239a2f04351SSebastien Royconnection termination request.
240a2f04351SSebastien Roy.El
241a2f04351SSebastien Roy.Pp
242a2f04351SSebastien RoySee RFC 793 for a more complete understanding of the TCP protocol and TCP
243a2f04351SSebastien Royconnection states.
244a2f04351SSebastien Roy.It Sy suna
245a2f04351SSebastien RoyThe number of unacknowledged bytes outstanding at this instant.
246a2f04351SSebastien Roy.It Sy swnd
247a2f04351SSebastien RoyThe size of the local TCP send window (the peer's receive window) at this
248a2f04351SSebastien Royinstant.
249a2f04351SSebastien Roy.It Sy unsent
250a2f04351SSebastien RoyThe number of unsent bytes in the local TCP transmit queue at this instant.
251a2f04351SSebastien Roy.El
252a2f04351SSebastien Roy.Sh EXIT STATUS
253a2f04351SSebastien RoyThe
254a2f04351SSebastien Roy.Nm
255a2f04351SSebastien Royutility exits 0 on success, or 1 if an error occurs.
256a2f04351SSebastien Roy.Sh EXAMPLES
257a2f04351SSebastien Roy.Bl -tag -width ""
258a2f04351SSebastien Roy.It Sy Example 1 List established connections.
259a2f04351SSebastien RoyBy default, connstat lists basic connection details.
260a2f04351SSebastien RoyUsing the
261a2f04351SSebastien Roy.Fl e
262a2f04351SSebastien Royoption allows the user to get a quick glance of established connections.
263a2f04351SSebastien Roy.Bd -literal
264a2f04351SSebastien Roy$ connstat -e
265a2f04351SSebastien Roy          LADDR  LPORT           RADDR  RPORT        STATE
266a2f04351SSebastien Roy   10.43.37.172  51275    172.16.105.4    389  ESTABLISHED
267a2f04351SSebastien Roy   10.43.37.172     22    172.16.98.16  62270  ESTABLISHED
268a2f04351SSebastien Roy   10.43.37.172   1020  172.16.100.162   2049  ESTABLISHED
269a2f04351SSebastien Roy   10.43.37.172   1019     10.43.11.64   2049  ESTABLISHED
270a2f04351SSebastien Roy   10.43.37.172     22    172.16.98.16  61520  ESTABLISHED
271a2f04351SSebastien Roy   10.43.37.172     80    10.43.16.132  59467  ESTABLISHED
272a2f04351SSebastien Roy.Ed
273a2f04351SSebastien Roy.It Sy Example 2 Show one connection's I/O stats every second
274a2f04351SSebastien RoyThe
275a2f04351SSebastien Roy.Fl F
276a2f04351SSebastien Royoption is used to filter a specific connection,
277a2f04351SSebastien Roy.Fl o
278a2f04351SSebastien Royis used to output specific fields, and
279a2f04351SSebastien Roy.Fl i
280a2f04351SSebastien Royto provide the output interval in seconds.
281a2f04351SSebastien Roy.Bd -literal
282a2f04351SSebastien Roy$ connstat -F lport=22,rport=49675,raddr=172.16.168.30 \e
283a2f04351SSebastien Roy  -o inbytes,outbytes -i 1
284a2f04351SSebastien Roy    INBYTES    OUTBYTES
285a2f04351SSebastien Roy       9589       18101
286a2f04351SSebastien Roy    INBYTES    OUTBYTES
287a2f04351SSebastien Roy       9589       18341
288a2f04351SSebastien Roy    INBYTES    OUTBYTES
289a2f04351SSebastien Roy       9589       18501
290a2f04351SSebastien Roy    INBYTES    OUTBYTES
291a2f04351SSebastien Roy       9589       18661
292a2f04351SSebastien Roy    ...
293a2f04351SSebastien Roy.Ed
294a2f04351SSebastien Roy.It Sy Example 3 Understanding the bottleneck for a given connection
295a2f04351SSebastien RoyUnderstanding the transmit bottleneck for a connection requires knowing the
296a2f04351SSebastien Roysize of the congestion window, whether the window is full, and the round-trip
297a2f04351SSebastien Roytime to the peer.
298a2f04351SSebastien RoyThe congestion window is full when
299a2f04351SSebastien Roy.Sy suna
300a2f04351SSebastien Royis equal to
301a2f04351SSebastien Roy.Sy cwnd .
302a2f04351SSebastien RoyIf the window is full, then the throughput is limited by the size of the window
303a2f04351SSebastien Royand the round-trip time.
304a2f04351SSebastien RoyIn that case, knowing these two values is critical.
305a2f04351SSebastien RoyEither the window is small because of retransmissions, or the round-trip
306a2f04351SSebastien Roylatency is high, or both.
307a2f04351SSebastien RoyIn the example below, the window is small due to high congestion or an
308a2f04351SSebastien Royunreliable network.
309a2f04351SSebastien Roy.Bd -literal
310a2f04351SSebastien Roy$ connstat -F lport=41934,rport=50001 \e
311a2f04351SSebastien Roy  -o outbytes,suna,cwnd,unsent,retransbytes,rtt -T d -i 1
312a2f04351SSebastien RoyJuly  7, 2016 11:04:40 AM EDT
313a2f04351SSebastien Roy   OUTBYTES        SUNA        CWND      UNSENT  RETRANSBYTES      RTT
314a2f04351SSebastien Roy 1647048093       47784       47784     3017352       3701844      495
315a2f04351SSebastien RoyJuly  7, 2016 11:04:41 AM EDT
316a2f04351SSebastien Roy   OUTBYTES        SUNA        CWND      UNSENT  RETRANSBYTES      RTT
317a2f04351SSebastien Roy 1660720109       41992       41992     1535032       3765556      673
318a2f04351SSebastien RoyJuly  7, 2016 11:04:42 AM EDT
319a2f04351SSebastien Roy   OUTBYTES        SUNA        CWND      UNSENT  RETRANSBYTES      RTT
320a2f04351SSebastien Roy 1661875613       26064       26064     4311688       3829268      571
321a2f04351SSebastien RoyJuly  7, 2016 11:04:43 AM EDT
322a2f04351SSebastien Roy   OUTBYTES        SUNA        CWND      UNSENT  RETRANSBYTES      RTT
323a2f04351SSebastien Roy 1681478637       41992       41992      437304       3932076     1471
324a2f04351SSebastien RoyJuly  7, 2016 11:04:44 AM EDT
325a2f04351SSebastien Roy   OUTBYTES        SUNA        CWND      UNSENT  RETRANSBYTES      RTT
326a2f04351SSebastien Roy 1692028765       44888       44888     1945800       4014612      921
327a2f04351SSebastien Roy\&...
328a2f04351SSebastien Roy.Ed
329a2f04351SSebastien Roy.It Sy Example 4 Calculating average RTT over intervals
330a2f04351SSebastien RoyAs described in the
331a2f04351SSebastien Roy.Sx Fields
332a2f04351SSebastien Roysection, the
333a2f04351SSebastien Roy.Sy rtts
334a2f04351SSebastien Royand
335a2f04351SSebastien Roy.Sy rttc
336a2f04351SSebastien Royfields can be used to calculate average RTT over a period of time.
337a2f04351SSebastien RoyThe following example combines machine parsable output with these fields to do
338a2f04351SSebastien Roythis programmatically.
339a2f04351SSebastien RoyThe script:
340a2f04351SSebastien Roy.Bd -literal
341a2f04351SSebastien Roy#!/bin/bash
342a2f04351SSebastien Roy
343a2f04351SSebastien Royi=0
344a2f04351SSebastien Royconnstat -P -F lport=41934,rport=50001 -o rttc,rtts -i 1 | \e
345a2f04351SSebastien Roy    while IFS=, read rttc[$i] rtts[$i]; do
346a2f04351SSebastien Roy        if [[ $i != 0 ]]; then
347a2f04351SSebastien Roy                let rtt="(${rtts[$i]} - ${rtts[$i - 1]}) / \e
348a2f04351SSebastien Roy                    (${rttc[$i]} - ${rttc[$i - 1]})"
349a2f04351SSebastien Roy                print "avg rtt = ${rtt}us"
350a2f04351SSebastien Roy        fi
351a2f04351SSebastien Roy        ((i++))
352a2f04351SSebastien Roydone
353a2f04351SSebastien Roy.Ed
354a2f04351SSebastien Roy.Pp
355a2f04351SSebastien RoyThe output:
356a2f04351SSebastien Roy.Bd -literal
357a2f04351SSebastien Roy\&...
358a2f04351SSebastien Royavg rtt = 992us
359a2f04351SSebastien Royavg rtt = 829us
360a2f04351SSebastien Royavg rtt = 712us
361a2f04351SSebastien Royavg rtt = 869us
362a2f04351SSebastien Roy\&...
363a2f04351SSebastien Roy.Ed
364a2f04351SSebastien Roy.It Sy Example 5 Show HTTP server connections in TIME_WAIT state
365a2f04351SSebastien RoyConnections accumulating in TIME_WAIT state can sometimes be an issue, as these
366a2f04351SSebastien Royconnections linger and take up port number space while their time wait timer
367a2f04351SSebastien Royis ticking.
368a2f04351SSebastien Roy.Bd -literal
369a2f04351SSebastien Roy$ connstat -F state=time_wait,lport=80
370a2f04351SSebastien Roy          LADDR  LPORT           RADDR  RPORT        STATE
371a2f04351SSebastien Roy   10.43.37.172     80   172.16.168.30  56067    TIME_WAIT
372a2f04351SSebastien Roy   10.43.37.172     80   172.16.168.30  56068    TIME_WAIT
373a2f04351SSebastien Roy   10.43.37.172     80   172.16.168.30  56070    TIME_WAIT
374a2f04351SSebastien Roy.Ed
375a2f04351SSebastien Roy.El
376a2f04351SSebastien Roy.Sh INTERFACE STABILITY
377a2f04351SSebastien RoyThe command line options for this command are stable, but the output format
378a2f04351SSebastien Roywhen not using the
379a2f04351SSebastien Roy.Fl P
380a2f04351SSebastien Royoption and diagnostic messages are not.
381a2f04351SSebastien Roy.Sh SEE ALSO
382bbf21555SRichard Lowe.Xr netstat 8
383a2f04351SSebastien Roy.Rs
384a2f04351SSebastien Roy.%A J. Postel
385a2f04351SSebastien Roy.%B Transmission Control Protocol, STD 7, RFC 793
386a2f04351SSebastien Roy.%D September 1981
387a2f04351SSebastien Roy.Re
388a2f04351SSebastien Roy.Rs
389a2f04351SSebastien Roy.%A V. Paxson
390a2f04351SSebastien Roy.%A M. Allman
391a2f04351SSebastien Roy.%A J. Chu
392a2f04351SSebastien Roy.%A M. Sargent
393a2f04351SSebastien Roy.%B Computing TCP's Retransmission Timer, RFC 6298
394a2f04351SSebastien Roy.%D June 2011
395a2f04351SSebastien Roy.Re
396