xref: /freebsd/usr.bin/netstat/netstat.1 (revision ef36b3f75658d201edb495068db5e1be49593de5)
1.\" Copyright (c) 1983, 1990, 1992, 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.\"	@(#)netstat.1	8.8 (Berkeley) 4/18/94
29.\" $FreeBSD$
30.\"
31.Dd September 9, 2017
32.Dt NETSTAT 1
33.Os
34.Sh NAME
35.Nm netstat
36.Nd show network status and statistics
37.Sh SYNOPSIS
38.Bk -words
39.Bl -tag -width "netstat"
40.It Nm
41.Op Fl -libxo
42.Op Fl 46AaLnRSTWx
43.Op Fl f Ar protocol_family | Fl p Ar protocol
44.Op Fl M Ar core
45.Op Fl N Ar system
46.It Nm Fl i | I Ar interface
47.Op Fl -libxo
48.Op Fl 46abdhnW
49.Op Fl f Ar address_family
50.Op Fl M Ar core
51.Op Fl N Ar system
52.It Nm Fl w Ar wait
53.Op Fl -libxo
54.Op Fl I Ar interface
55.Op Fl 46d
56.Op Fl M Ar core
57.Op Fl N Ar system
58.Op Fl q Ar howmany
59.It Nm Fl s
60.Op Fl -libxo
61.Op Fl 46sz
62.Op Fl f Ar protocol_family | Fl p Ar protocol
63.Op Fl M Ar core
64.Op Fl N Ar system
65.It Nm Fl i | I Ar interface Fl s
66.Op Fl -libxo
67.Op Fl 46s
68.Op Fl f Ar protocol_family | Fl p Ar protocol
69.Op Fl M Ar core
70.Op Fl N Ar system
71.It Nm Fl m
72.Op Fl -libxo
73.Op Fl M Ar core
74.Op Fl N Ar system
75.It Nm Fl B
76.Op Fl -libxo
77.Op Fl z
78.Op Fl I Ar interface
79.It Nm Fl r
80.Op Fl -libxo
81.Op Fl 46nW
82.Op Fl F Ar fibnum
83.Op Fl f Ar address_family
84.It Nm Fl rs
85.Op Fl -libxo
86.Op Fl s
87.Op Fl M Ar core
88.Op Fl N Ar system
89.It Nm Fl g
90.Op Fl -libxo
91.Op Fl 46W
92.Op Fl f Ar address_family
93.It Nm Fl gs
94.Op Fl -libxo
95.Op Fl 46s
96.Op Fl f Ar address_family
97.Op Fl M Ar core
98.Op Fl N Ar system
99.It Nm Fl Q
100.Op Fl -libxo
101.El
102.Ek
103.Sh DESCRIPTION
104The
105.Nm
106command symbolically displays the contents of various network-related
107data structures.
108There are a number of output formats,
109depending on the options for the information presented.
110.Bl -tag -width indent
111.It Xo
112.Bk -words
113.Nm
114.Op Fl 46AaLnRSTWx
115.Op Fl f Ar protocol_family | Fl p Ar protocol
116.Op Fl M Ar core
117.Op Fl N Ar system
118.Ek
119.Xc
120Display a list of active sockets
121(protocol control blocks)
122for each network protocol.
123.Pp
124The default display for active sockets shows the local
125and remote addresses, send and receive queue sizes (in bytes), protocol,
126and the internal state of the protocol.
127Address formats are of the form
128.Dq host.port
129or
130.Dq network.port
131if a socket's address specifies a network but no specific host address.
132When known, the host and network addresses are displayed symbolically
133according to the databases
134.Xr hosts 5
135and
136.Xr networks 5 ,
137respectively.
138If a symbolic name for an address is unknown, or if
139the
140.Fl n
141option is specified, the address is printed numerically, according
142to the address family.
143For more information regarding
144the Internet IPv4
145.Dq dot format ,
146refer to
147.Xr inet 3 .
148Unspecified,
149or
150.Dq wildcard ,
151addresses and ports appear as
152.Dq Li * .
153.Bl -tag -width indent
154.It Fl -libxo
155Generate output via
156.Xr libxo 3
157in a selection of different human and machine readable formats.
158See
159.Xr xo_parse_args 3
160for details on command line arguments.
161.It Fl 4
162Show IPv4 only.
163See
164.Sx GENERAL OPTIONS .
165.It Fl 6
166Show IPv6 only.
167See
168.Sx GENERAL OPTIONS .
169.It Fl A
170Show the address of a protocol control block (PCB)
171associated with a socket; used for debugging.
172.It Fl a
173Show the state of all sockets;
174normally sockets used by server processes are not shown.
175.It Fl L
176Show the size of the various listen queues.
177The first count shows the number of unaccepted connections,
178the second count shows the amount of unaccepted incomplete connections,
179and the third count is the maximum number of queued connections.
180.It Fl n
181Do not resolve numeric addresses and port numbers to names.
182See
183.Sx GENERAL OPTIONS .
184.It Fl R
185Display the flowid and flowtype for each socket.
186flowid is a 32 bit hardware specific identifier for each flow.
187flowtype defines which protocol fields are hashed to produce the id.
188A complete listing is available in
189.Pa sys/mbuf.h
190under
191.Dv M_HASHTYPE_* .
192.It Fl S
193Show network addresses as numbers (as with
194.Fl n )
195but show ports symbolically.
196.It Fl T
197Display diagnostic information from the TCP control block.
198Fields include the number of packets requiring retransmission,
199received out-of-order, and those advertising a zero-sized window.
200.It Fl W
201Avoid truncating addresses even if this causes some fields to overflow.
202.It Fl x
203Display socket buffer and TCP timer statistics for each
204internet socket.
205.Pp
206The
207.Fl x
208flag causes
209.Nm
210to output all the information recorded about data
211stored in the socket buffers.
212The fields are:
213.Bl -column ".Li R-MBUF"
214.It Li R-MBUF Ta Number of mbufs in the receive queue.
215.It Li S-MBUF Ta Number of mbufs in the send queue.
216.It Li R-CLUS Ta Number of clusters, of any type, in the receive
217queue.
218.It Li S-CLUS Ta Number of clusters, of any type, in the send queue.
219.It Li R-HIWA Ta Receive buffer high water mark, in bytes.
220.It Li S-HIWA Ta Send buffer high water mark, in bytes.
221.It Li R-LOWA Ta Receive buffer low water mark, in bytes.
222.It Li S-LOWA Ta Send buffer low water mark, in bytes.
223.It Li R-BCNT Ta Receive buffer byte count.
224.It Li S-BCNT Ta Send buffer byte count.
225.It Li R-BMAX Ta Maximum bytes that can be used in the receive buffer.
226.It Li S-BMAX Ta Maximum bytes that can be used in the send buffer.
227.It Li rexmt Ta Time, in seconds, to fire Retransmit Timer, or 0 if not armed.
228.It Li persist Ta Time, in seconds, to fire Retransmit Persistence, or 0 if not armed.
229.It Li keep Ta Time, in seconds, to fire Keep Alive, or 0 if not armed.
230.It Li 2msl Ta Time, in seconds, to fire 2*msl TIME_WAIT Timer, or 0 if not armed.
231.It Li delack Ta Time, in seconds, to fire Delayed ACK Timer, or 0 if not armed.
232.It Li rcvtime Ta Time, in seconds, since last packet received.
233.El
234.It Fl f Ar protocol_family
235Filter by
236.Ar protocol_family .
237See
238.Sx GENERAL OPTIONS .
239.It Fl p Ar protocol
240Filter by
241.Ar protocol .
242See
243.Sx GENERAL OPTIONS .
244.It Fl M
245Use an alternative core.
246See
247.Sx GENERAL OPTIONS .
248.It Fl N
249Use an alternative kernel image.
250See
251.Sx GENERAL OPTIONS .
252.El
253.It Xo
254.Bk -words
255.Nm
256.Fl i | I Ar interface
257.Op Fl 46abdhnW
258.Op Fl f Ar address_family
259.Op Fl M Ar core
260.Op Fl N Ar system
261.Ek
262.Xc
263Show the state of all network interfaces or a single
264.Ar interface
265which have been auto-configured
266(interfaces statically configured into a system, but not
267located at boot time are not shown).
268An asterisk
269.Pq Dq Li *
270after an interface name indicates that the interface is
271.Dq down .
272.Pp
273When
274.Nm
275is invoked with
276.Fl i
277.Pq all interfaces
278or
279.Fl I Ar interface ,
280it provides a table of cumulative
281statistics regarding packets transferred, errors, and collisions.
282The network addresses of the interface
283and the maximum transmission unit
284.Pq Dq mtu
285are also displayed.
286.Bl -tag -width indent
287.It Fl 4
288Show IPv4 only.
289See
290.Sx GENERAL OPTIONS .
291.It Fl 6
292Show IPv6 only.
293See
294.Sx GENERAL OPTIONS .
295.It Fl a
296Multicast addresses currently in use are shown
297for each Ethernet interface and for each IP interface address.
298Multicast addresses are shown on separate lines following the interface
299address with which they are associated.
300.It Fl b
301Show the number of bytes in and out.
302.It Fl d
303Show the number of dropped packets.
304.It Fl h
305Print all counters in human readable form.
306.It Fl n
307Do not resolve numeric addresses and port numbers to names.
308See
309.Sx GENERAL OPTIONS .
310.It Fl W
311Avoid truncating interface names even if this causes some fields to overflow.
312.Sx GENERAL OPTIONS .
313.It Fl f Ar protocol_family
314Filter by
315.Ar protocol_family .
316See
317.Sx GENERAL OPTIONS .
318.El
319.It Xo
320.Bk -words
321.Nm
322.Fl w Ar wait
323.Op Fl I Ar interface
324.Op Fl 46d
325.Op Fl M Ar core
326.Op Fl N Ar system
327.Op Fl q Ar howmany
328.Ek
329.Xc
330At intervals of
331.Ar wait
332seconds, display the information regarding packet traffic on all
333configured network interfaces or a single
334.Ar interface .
335.Pp
336When
337.Nm
338is invoked with the
339.Fl w
340option and a
341.Ar wait
342interval argument, it displays a running count of statistics related to
343network interfaces.
344An obsolescent version of this option used a numeric parameter
345with no option, and is currently supported for backward compatibility.
346By default, this display summarizes information for all interfaces.
347Information for a specific interface may be displayed with the
348.Fl I Ar interface
349option.
350.Bl -tag -width indent
351.It Fl I Ar interface
352Only show information regarding
353.Ar interface
354.It Fl 4
355Show IPv4 only.
356See
357.Sx GENERAL OPTIONS .
358.It Fl 6
359Show IPv6 only.
360See
361.Sx GENERAL OPTIONS .
362.It Fl d
363Show the number of dropped packets.
364.It Fl M
365Use an alternative core.
366See
367.Sx GENERAL OPTIONS .
368.It Fl N
369Use an alternative kernel image.
370See
371.Sx GENERAL OPTIONS .
372.It Fl q
373Exit after
374.Ar howmany
375outputs.
376.El
377.It Xo
378.Bk -words
379.Nm
380.Fl s
381.Op Fl 46sz
382.Op Fl f Ar protocol_family | Fl p Ar protocol
383.Op Fl M Ar core
384.Op Fl N Ar system
385.Ek
386.Xc
387Display system-wide statistics for each network protocol.
388.Bl -tag -width indent
389.It Fl 4
390Show IPv4 only.
391See
392.Sx GENERAL OPTIONS .
393.It Fl 6
394Show IPv6 only.
395See
396.Sx GENERAL OPTIONS .
397.It Fl s
398If
399.Fl s
400is repeated, counters with a value of zero are suppressed.
401.It Fl z
402Reset statistic counters after displaying them.
403.It Fl f Ar protocol_family
404Filter by
405.Ar protocol_family .
406See
407.Sx GENERAL OPTIONS .
408.It Fl p Ar protocol
409Filter by
410.Ar protocol .
411See
412.Sx GENERAL OPTIONS .
413.It Fl M
414Use an alternative core.
415See
416.Sx GENERAL OPTIONS .
417.It Fl N
418Use an alternative kernel image
419See
420.Sx GENERAL OPTIONS .
421.El
422.It Xo
423.Bk -words
424.Nm
425.Fl i | I Ar interface Fl s
426.Op Fl 46s
427.Op Fl f Ar protocol_family | Fl p Ar protocol
428.Op Fl M Ar core
429.Op Fl N Ar system
430.Ek
431.Xc
432Display per-interface statistics for each network protocol.
433.Bl -tag -width indent
434.It Fl 4
435Show IPv4 only
436See
437.Sx GENERAL OPTIONS .
438.It Fl 6
439Show IPv6 only
440See
441.Sx GENERAL OPTIONS .
442.It Fl s
443If
444.Fl s
445is repeated, counters with a value of zero are suppressed.
446.It Fl f Ar protocol_family
447Filter by
448.Ar protocol_family .
449See
450.Sx GENERAL OPTIONS .
451.It Fl p Ar protocol
452Filter by
453.Ar protocol .
454See
455.Sx GENERAL OPTIONS .
456.It Fl M
457Use an alternative core
458See
459.Sx GENERAL OPTIONS .
460.It Fl N
461Use an alternative kernel image
462See
463.Sx GENERAL OPTIONS .
464.El
465.It Xo
466.Bk -words
467.Nm
468.Fl m
469.Op Fl M Ar core
470.Op Fl N Ar system
471.Ek
472.Xc
473Show statistics recorded by the memory management routines
474.Pq Xr mbuf 9 .
475The network manages a private pool of memory buffers.
476.Bl -tag -width indent
477.It Fl M
478Use an alternative core
479See
480.Sx GENERAL OPTIONS .
481.It Fl N
482Use an alternative kernel image
483See
484.Sx GENERAL OPTIONS .
485.El
486.It Xo
487.Bk -words
488.Nm
489.Fl B
490.Op Fl z
491.Op Fl I Ar interface
492.Ek
493.Xc
494Show statistics about
495.Xr bpf 4
496peers.
497This includes information like
498how many packets have been matched, dropped and received by the
499bpf device, also information about current buffer sizes and device
500states.
501.Pp
502The
503.Xr bpf 4
504flags displayed when
505.Nm
506is invoked with the
507.Fl B
508option represent the underlying parameters of the bpf peer.
509Each flag is
510represented as a single lower case letter.
511The mapping between the letters and flags in order of appearance are:
512.Bl -column ".Li i"
513.It Li p Ta Set if listening promiscuously
514.It Li i Ta Dv BIOCIMMEDIATE No has been set on the device
515.It Li f Ta Dv BIOCGHDRCMPLT No status: source link addresses are being
516filled automatically
517.It Li s Ta Dv BIOCGSEESENT No status: see packets originating locally and
518remotely on the interface.
519.It Li a Ta Packet reception generates a signal
520.It Li l Ta Dv BIOCLOCK No status: descriptor has been locked
521.El
522.Pp
523For more information about these flags, please refer to
524.Xr bpf 4 .
525.Bl -tag -width indent
526.It Fl z
527Reset statistic counters after displaying them.
528.El
529.It Xo
530.Bk -words
531.Nm
532.Fl r
533.Op Fl 46AnW
534.Op Fl F Ar fibnum
535.Op Fl f Ar address_family
536.Op Fl M Ar core
537.Op Fl N Ar system
538.Ek
539.Xc
540Display the contents of routing tables.
541.Pp
542When
543.Nm
544is invoked with the routing table option
545.Fl r ,
546it lists the available routes and their status.
547Each route consists of a destination host or network, and a gateway to use
548in forwarding packets.
549The flags field shows a collection of information about the route stored
550as binary choices.
551The individual flags are discussed in more detail in the
552.Xr route 8
553and
554.Xr route 4
555manual pages.
556The mapping between letters and flags is:
557.Bl -column ".Li W" ".Dv RTF_WASCLONED"
558.It Li 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1"
559.It Li 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2"
560.It Li 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3"
561.It Li B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)"
562.It Li b Ta Dv RTF_BROADCAST Ta "The route represents a broadcast address"
563.It Li D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)"
564.It Li G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary"
565.It Li H Ta Dv RTF_HOST Ta "Host entry (net otherwise)"
566.It Li L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation"
567.It Li M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)"
568.It Li R Ta Dv RTF_REJECT Ta "Host or net unreachable"
569.It Li S Ta Dv RTF_STATIC Ta "Manually added"
570.It Li U Ta Dv RTF_UP Ta "Route usable"
571.It Li X Ta Dv RTF_XRESOLVE Ta "External daemon translates proto to link address"
572.El
573.Pp
574Direct routes are created for each
575interface attached to the local host;
576the gateway field for such entries shows the address of the outgoing interface.
577The refcnt field gives the
578current number of active uses of the route.
579Connection oriented
580protocols normally hold on to a single route for the duration of
581a connection while connectionless protocols obtain a route while sending
582to the same destination.
583The use field provides a count of the number of packets
584sent using that route.
585The interface entry indicates the network interface utilized for the route.
586.Bl -tag -width indent
587.It Fl 4
588Show IPv4 only.
589See
590.Sx GENERAL OPTIONS .
591.It Fl 6
592Show IPv6 only.
593See
594.Sx GENERAL OPTIONS .
595.It Fl n
596Do not resolve numeric addresses and port numbers to names.
597See
598.Sx GENERAL OPTIONS .
599.It Fl W
600Show the path MTU for each route, and print interface names with a
601wider field size.
602.It Fl F
603Display the routing table with the number
604.Ar fibnum .
605If the specified
606.Ar fibnum
607is -1 or
608.Fl F
609is not specified,
610the default routing table is displayed.
611.It Fl f
612Display the routing table for a particular
613.Ar address_family .
614.It Fl M
615Use an alternative core
616See
617.Sx GENERAL OPTIONS .
618.It Fl N
619Use an alternative kernel image
620See
621.Sx GENERAL OPTIONS .
622.El
623.It Xo
624.Bk -words
625.Nm
626.Fl rs
627.Op Fl s
628.Op Fl M Ar core
629.Op Fl N Ar system
630.Ek
631.Xc
632Display routing statistics.
633.Bl -tag -width indent
634.It Fl s
635If
636.Fl s
637is repeated, counters with a value of zero are suppressed.
638.It Fl M
639Use an alternative core
640See
641.Sx GENERAL OPTIONS .
642.It Fl N
643Use an alternative kernel image
644See
645.Sx GENERAL OPTIONS .
646.El
647.It Xo
648.Bk -words
649.Nm
650.Fl g
651.Op Fl 46W
652.Op Fl f Ar address_family
653.Op Fl M Ar core
654.Op Fl N Ar system
655.Ek
656.Xc
657Display the contents of the multicast virtual interface tables,
658and multicast forwarding caches.
659Entries in these tables will appear only when the kernel is
660actively forwarding multicast sessions.
661This option is applicable only to the
662.Cm inet
663and
664.Cm inet6
665address families.
666.Bl -tag -width indent
667.It Fl 4
668Show IPv4 only
669See
670.Sx GENERAL OPTIONS .
671.It Fl 6
672Show IPv6 only
673See
674.Sx GENERAL OPTIONS .
675.It Fl W
676Avoid truncating addresses even if this causes some fields to overflow.
677.It Fl f Ar protocol_family
678Filter by
679.Ar protocol_family .
680See
681.Sx GENERAL OPTIONS .
682.It Fl M
683Use an alternative core
684See
685.Sx GENERAL OPTIONS .
686.It Fl N
687Use an alternative kernel image
688See
689.Sx GENERAL OPTIONS .
690.El
691.It Xo
692.Bk -words
693.Nm
694.Fl gs
695.Op Fl 46s
696.Op Fl f Ar address_family
697.Op Fl M Ar core
698.Op Fl N Ar system
699.Ek
700.Xc
701Show multicast routing statistics.
702.Bl -tag -width indent
703.It Fl 4
704Show IPv4 only
705See
706.Sx GENERAL OPTIONS .
707.It Fl 6
708Show IPv6 only
709See
710.Sx GENERAL OPTIONS .
711.It Fl s
712If
713.Fl s
714is repeated, counters with a value of zero are suppressed.
715.It Fl f Ar protocol_family
716Filter by
717.Ar protocol_family .
718See
719.Sx GENERAL OPTIONS .
720.It Fl M
721Use an alternative core
722See
723.Sx GENERAL OPTIONS .
724.It Fl N
725Use an alternative kernel image
726See
727.Sx GENERAL OPTIONS .
728.El
729.It Xo
730.Bk -words
731.Nm
732.Fl Q
733.Ek
734.Xc
735Show
736.Xr netisr 9
737statistics.
738The flags field shows available ISR handlers:
739.Bl -column ".Li W" ".Dv NETISR_SNP_FLAGS_DRAINEDCPU"
740.It Li C Ta Dv NETISR_SNP_FLAGS_M2CPUID Ta "Able to map mbuf to cpu id"
741.It Li D Ta Dv NETISR_SNP_FLAGS_DRAINEDCPU  Ta "Has queue drain handler"
742.It Li F Ta Dv NETISR_SNP_FLAGS_M2FLOW Ta "Able to map mbuf to flow id"
743.El
744.El
745.Pp
746.Ss GENERAL OPTIONS
747Some options have the general meaning:
748.Bl -tag -width flag
749.It Fl 4
750Is shorthand for
751.Fl f
752.Ar inet
753.Pq Show only IPv4
754.It Fl 6
755Is shorthand for
756.Fl f
757.Ar inet6
758.Pq Show only IPv6
759.It Fl f Ar address_family , Fl p Ar protocol
760Limit display to those records
761of the specified
762.Ar address_family
763or a single
764.Ar protocol .
765The following address families and protocols are recognized:
766.Pp
767.Bl -tag -width ".Cm netgraph , ng Pq Dv AF_NETGRAPH" -compact
768.It Em Family
769.Em Protocols
770.It Cm inet Pq Dv AF_INET
771.Cm divert , icmp , igmp , ip , ipsec , pim, sctp , tcp , udp
772.It Cm inet6 Pq Dv AF_INET6
773.Cm icmp6 , ip6 , ipsec6 , rip6 , sctp , tcp , udp
774.It Cm pfkey Pq Dv PF_KEY
775.Cm pfkey
776.It Cm netgraph , ng Pq Dv AF_NETGRAPH
777.Cm ctrl , data
778.It Cm unix Pq Dv AF_UNIX
779.It Cm link Pq Dv AF_LINK
780.El
781.Pp
782The program will complain if
783.Ar protocol
784is unknown or if there is no statistics routine for it.
785.It Fl M
786Extract values associated with the name list from the specified core
787instead of the default
788.Pa /dev/kmem .
789.It Fl N
790Extract the name list from the specified system instead of the default,
791which is the kernel image the system has booted from.
792.It Fl n
793Show network addresses and ports as numbers.
794Normally
795.Nm
796attempts to resolve addresses and ports,
797and display them symbolically.
798.El
799.Sh SEE ALSO
800.Xr fstat 1 ,
801.Xr nfsstat 1 ,
802.Xr procstat 1 ,
803.Xr ps 1 ,
804.Xr sockstat 1 ,
805.Xr libxo 3 ,
806.Xr xo_parse_args 3 ,
807.Xr bpf 4 ,
808.Xr inet 4 ,
809.Xr route 4 ,
810.Xr unix 4 ,
811.Xr hosts 5 ,
812.Xr networks 5 ,
813.Xr protocols 5 ,
814.Xr services 5 ,
815.Xr iostat 8 ,
816.Xr route 8 ,
817.Xr trpt 8 ,
818.Xr vmstat 8 ,
819.Xr mbuf 9
820.Sh HISTORY
821The
822.Nm
823command appeared in
824.Bx 4.2 .
825.Pp
826IPv6 support was added by WIDE/KAME project.
827.Sh BUGS
828The notion of errors is ill-defined.
829