]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/netstat/netstat.1
Fix SCTP socket use-after-free.
[FreeBSD/FreeBSD.git] / usr.bin / netstat / netstat.1
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 .\" 4. 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
104 The
105 .Nm
106 command symbolically displays the contents of various network-related
107 data structures.
108 There are a number of output formats,
109 depending 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
120 Display a list of active sockets
121 (protocol control blocks)
122 for each network protocol.
123 .Pp
124 The default display for active sockets shows the local
125 and remote addresses, send and receive queue sizes (in bytes), protocol,
126 and the internal state of the protocol.
127 Address formats are of the form
128 .Dq host.port
129 or
130 .Dq network.port
131 if a socket's address specifies a network but no specific host address.
132 When known, the host and network addresses are displayed symbolically
133 according to the databases
134 .Xr hosts 5
135 and
136 .Xr networks 5 ,
137 respectively.
138 If a symbolic name for an address is unknown, or if
139 the
140 .Fl n
141 option is specified, the address is printed numerically, according
142 to the address family.
143 For more information regarding
144 the Internet IPv4
145 .Dq dot format ,
146 refer to
147 .Xr inet 3 .
148 Unspecified,
149 or
150 .Dq wildcard ,
151 addresses and ports appear as
152 .Dq Li * .
153 .Bl -tag -width indent
154 .It Fl -libxo
155 Generate output via
156 .Xr libxo 3
157 in a selection of different human and machine readable formats.
158 See
159 .Xr xo_parse_args 3
160 for details on command line arguments.
161 .It Fl 4
162 Show IPv4 only.
163 See
164 .Sx GENERAL OPTIONS .
165 .It Fl 6
166 Show IPv6 only.
167 See
168 .Sx GENERAL OPTIONS .
169 .It Fl A
170 Show the address of a protocol control block (PCB)
171 associated with a socket; used for debugging.
172 .It Fl a
173 Show the state of all sockets;
174 normally sockets used by server processes are not shown.
175 .It Fl L
176 Show the size of the various listen queues.
177 The first count shows the number of unaccepted connections,
178 the second count shows the amount of unaccepted incomplete connections,
179 and the third count is the maximum number of queued connections.
180 .It Fl n
181 Do not resolve numeric addresses and port numbers to names.
182 See
183 .Sx GENERAL OPTIONS .
184 .It Fl R
185 Display the flowid and flowtype for each socket.
186 flowid is a 32 bit hardware specific identifier for each flow.
187 flowtype defines which protocol fields are hashed to produce the id.
188 A complete listing is available in
189 .Pa sys/mbuf.h
190 under
191 .Dv M_HASHTYPE_* .
192 .It Fl S
193 Show network addresses as numbers (as with
194 .Fl n )
195 but show ports symbolically.
196 .It Fl T
197 Display diagnostic information from the TCP control block.
198 Fields include the number of packets requiring retransmission,
199 received out-of-order, and those advertising a zero-sized window.
200 .It Fl W
201 Avoid truncating addresses even if this causes some fields to overflow.
202 .It Fl x
203 Display socket buffer and TCP timer statistics for each
204 internet socket.
205 .Pp
206 The
207 .Fl x
208 flag causes
209 .Nm
210 to output all the information recorded about data
211 stored in the socket buffers.
212 The 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
217 queue.
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
235 Filter by
236 .Ar protocol_family .
237 See
238 .Sx GENERAL OPTIONS .
239 .It Fl p Ar protocol
240 Filter by
241 .Ar protocol .
242 See
243 .Sx GENERAL OPTIONS .
244 .It Fl M
245 Use an alternative core.
246 See
247 .Sx GENERAL OPTIONS .
248 .It Fl N
249 Use an alternative kernel image.
250 See
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
263 Show the state of all network interfaces or a single
264 .Ar interface
265 which have been auto-configured
266 (interfaces statically configured into a system, but not
267 located at boot time are not shown).
268 An asterisk
269 .Pq Dq Li *
270 after an interface name indicates that the interface is
271 .Dq down .
272 .Pp
273 When
274 .Nm
275 is invoked with
276 .Fl i
277 .Pq all interfaces
278 or
279 .Fl I Ar interface ,
280 it provides a table of cumulative
281 statistics regarding packets transferred, errors, and collisions.
282 The network addresses of the interface
283 and the maximum transmission unit
284 .Pq Dq mtu
285 are also displayed.
286 .Bl -tag -width indent
287 .It Fl 4
288 Show IPv4 only.
289 See
290 .Sx GENERAL OPTIONS .
291 .It Fl 6
292 Show IPv6 only.
293 See
294 .Sx GENERAL OPTIONS .
295 .It Fl a
296 Multicast addresses currently in use are shown
297 for each Ethernet interface and for each IP interface address.
298 Multicast addresses are shown on separate lines following the interface
299 address with which they are associated.
300 .It Fl b
301 Show the number of bytes in and out.
302 .It Fl d
303 Show the number of dropped packets.
304 .It Fl h
305 Print all counters in human readable form.
306 .It Fl n
307 Do not resolve numeric addresses and port numbers to names.
308 See
309 .Sx GENERAL OPTIONS .
310 .It Fl W
311 Avoid truncating interface names even if this causes some fields to overflow.
312 .Sx GENERAL OPTIONS .
313 .It Fl f Ar protocol_family
314 Filter by
315 .Ar protocol_family .
316 See
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
330 At intervals of
331 .Ar wait
332 seconds, display the information regarding packet traffic on all
333 configured network interfaces or a single
334 .Ar interface .
335 .Pp
336 When
337 .Nm
338 is invoked with the
339 .Fl w
340 option and a
341 .Ar wait
342 interval argument, it displays a running count of statistics related to
343 network interfaces.
344 An obsolescent version of this option used a numeric parameter
345 with no option, and is currently supported for backward compatibility.
346 By default, this display summarizes information for all interfaces.
347 Information for a specific interface may be displayed with the
348 .Fl I Ar interface
349 option.
350 .Bl -tag -width indent
351 .It Fl I Ar interface
352 Only show information regarding
353 .Ar interface
354 .It Fl 4
355 Show IPv4 only.
356 See
357 .Sx GENERAL OPTIONS .
358 .It Fl 6
359 Show IPv6 only.
360 See
361 .Sx GENERAL OPTIONS .
362 .It Fl d
363 Show the number of dropped packets.
364 .It Fl M
365 Use an alternative core.
366 See
367 .Sx GENERAL OPTIONS .
368 .It Fl N
369 Use an alternative kernel image.
370 See
371 .Sx GENERAL OPTIONS .
372 .It Fl q
373 Exit after
374 .Ar howmany
375 outputs.
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
387 Display system-wide statistics for each network protocol.
388 .Bl -tag -width indent
389 .It Fl 4
390 Show IPv4 only.
391 See
392 .Sx GENERAL OPTIONS .
393 .It Fl 6
394 Show IPv6 only.
395 See
396 .Sx GENERAL OPTIONS .
397 .It Fl s
398 If
399 .Fl s
400 is repeated, counters with a value of zero are suppressed.
401 .It Fl z
402 Reset statistic counters after displaying them.
403 .It Fl f Ar protocol_family
404 Filter by
405 .Ar protocol_family .
406 See
407 .Sx GENERAL OPTIONS .
408 .It Fl p Ar protocol
409 Filter by
410 .Ar protocol .
411 See
412 .Sx GENERAL OPTIONS .
413 .It Fl M
414 Use an alternative core.
415 See
416 .Sx GENERAL OPTIONS .
417 .It Fl N
418 Use an alternative kernel image
419 See
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
432 Display per-interface statistics for each network protocol.
433 .Bl -tag -width indent
434 .It Fl 4
435 Show IPv4 only
436 See
437 .Sx GENERAL OPTIONS .
438 .It Fl 6
439 Show IPv6 only
440 See
441 .Sx GENERAL OPTIONS .
442 .It Fl s
443 If
444 .Fl s
445 is repeated, counters with a value of zero are suppressed.
446 .It Fl f Ar protocol_family
447 Filter by
448 .Ar protocol_family .
449 See
450 .Sx GENERAL OPTIONS .
451 .It Fl p Ar protocol
452 Filter by
453 .Ar protocol .
454 See
455 .Sx GENERAL OPTIONS .
456 .It Fl M
457 Use an alternative core
458 See
459 .Sx GENERAL OPTIONS .
460 .It Fl N
461 Use an alternative kernel image
462 See
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
473 Show statistics recorded by the memory management routines
474 .Pq Xr mbuf 9 .
475 The network manages a private pool of memory buffers.
476 .Bl -tag -width indent
477 .It Fl M
478 Use an alternative core
479 See
480 .Sx GENERAL OPTIONS .
481 .It Fl N
482 Use an alternative kernel image
483 See
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
494 Show statistics about
495 .Xr bpf 4
496 peers.
497 This includes information like
498 how many packets have been matched, dropped and received by the
499 bpf device, also information about current buffer sizes and device
500 states.
501 .Pp
502 The
503 .Xr bpf 4
504 flags displayed when
505 .Nm
506 is invoked with the
507 .Fl B
508 option represent the underlying parameters of the bpf peer.
509 Each flag is
510 represented as a single lower case letter.
511 The 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
516 filled automatically
517 .It Li s Ta Dv BIOCGSEESENT No status: see packets originating locally and
518 remotely 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
523 For more information about these flags, please refer to
524 .Xr bpf 4 .
525 .Bl -tag -width indent
526 .It Fl z
527 Reset 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
540 Display the contents of routing tables.
541 .Pp
542 When
543 .Nm
544 is invoked with the routing table option
545 .Fl r ,
546 it lists the available routes and their status.
547 Each route consists of a destination host or network, and a gateway to use
548 in forwarding packets.
549 The flags field shows a collection of information about the route stored
550 as binary choices.
551 The individual flags are discussed in more detail in the
552 .Xr route 8
553 and
554 .Xr route 4
555 manual pages.
556 The 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
574 Direct routes are created for each
575 interface attached to the local host;
576 the gateway field for such entries shows the address of the outgoing interface.
577 The refcnt field gives the
578 current number of active uses of the route.
579 Connection oriented
580 protocols normally hold on to a single route for the duration of
581 a connection while connectionless protocols obtain a route while sending
582 to the same destination.
583 The use field provides a count of the number of packets
584 sent using that route.
585 The interface entry indicates the network interface utilized for the route.
586 .Bl -tag -width indent
587 .It Fl 4
588 Show IPv4 only.
589 See
590 .Sx GENERAL OPTIONS .
591 .It Fl 6
592 Show IPv6 only.
593 See
594 .Sx GENERAL OPTIONS .
595 .It Fl n
596 Do not resolve numeric addresses and port numbers to names.
597 See
598 .Sx GENERAL OPTIONS .
599 .It Fl W
600 Show the path MTU for each route, and print interface names with a
601 wider field size.
602 .It Fl F
603 Display the routing table with the number
604 .Ar fibnum .
605 If the specified
606 .Ar fibnum
607 is -1 or
608 .Fl F
609 is not specified,
610 the default routing table is displayed.
611 .It Fl f
612 Display the routing table for a particular
613 .Ar address_family .
614 .It Fl M
615 Use an alternative core
616 See
617 .Sx GENERAL OPTIONS .
618 .It Fl N
619 Use an alternative kernel image
620 See
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
632 Display routing statistics.
633 .Bl -tag -width indent
634 .It Fl s
635 If
636 .Fl s
637 is repeated, counters with a value of zero are suppressed.
638 .It Fl M
639 Use an alternative core
640 See
641 .Sx GENERAL OPTIONS .
642 .It Fl N
643 Use an alternative kernel image
644 See
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
657 Display the contents of the multicast virtual interface tables,
658 and multicast forwarding caches.
659 Entries in these tables will appear only when the kernel is
660 actively forwarding multicast sessions.
661 This option is applicable only to the
662 .Cm inet
663 and
664 .Cm inet6
665 address families.
666 .Bl -tag -width indent
667 .It Fl 4
668 Show IPv4 only
669 See
670 .Sx GENERAL OPTIONS .
671 .It Fl 6
672 Show IPv6 only
673 See
674 .Sx GENERAL OPTIONS .
675 .It Fl W
676 Avoid truncating addresses even if this causes some fields to overflow.
677 .It Fl f Ar protocol_family
678 Filter by
679 .Ar protocol_family .
680 See
681 .Sx GENERAL OPTIONS .
682 .It Fl M
683 Use an alternative core
684 See
685 .Sx GENERAL OPTIONS .
686 .It Fl N
687 Use an alternative kernel image
688 See
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
701 Show multicast routing statistics.
702 .Bl -tag -width indent
703 .It Fl 4
704 Show IPv4 only
705 See
706 .Sx GENERAL OPTIONS .
707 .It Fl 6
708 Show IPv6 only
709 See
710 .Sx GENERAL OPTIONS .
711 .It Fl s
712 If
713 .Fl s
714 is repeated, counters with a value of zero are suppressed.
715 .It Fl f Ar protocol_family
716 Filter by
717 .Ar protocol_family .
718 See
719 .Sx GENERAL OPTIONS .
720 .It Fl M
721 Use an alternative core
722 See
723 .Sx GENERAL OPTIONS .
724 .It Fl N
725 Use an alternative kernel image
726 See
727 .Sx GENERAL OPTIONS .
728 .El
729 .It Xo
730 .Bk -words
731 .Nm
732 .Fl Q
733 .Ek
734 .Xc
735 Show
736 .Xr netisr 9
737 statistics.
738 The 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
747 Some options have the general meaning:
748 .Bl -tag -width flag
749 .It Fl 4
750 Is shorthand for
751 .Fl f
752 .Ar inet
753 .Pq Show only IPv4
754 .It Fl 6
755 Is shorthand for
756 .Fl f
757 .Ar inet6
758 .Pq Show only IPv6
759 .It Fl f Ar address_family , Fl p Ar protocol
760 Limit display to those records
761 of the specified
762 .Ar address_family
763 or a single
764 .Ar protocol .
765 The 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
782 The program will complain if
783 .Ar protocol
784 is unknown or if there is no statistics routine for it.
785 .It Fl M
786 Extract values associated with the name list from the specified core
787 instead of the default
788 .Pa /dev/kmem .
789 .It Fl N
790 Extract the name list from the specified system instead of the default,
791 which is the kernel image the system has booted from.
792 .It Fl n
793 Show network addresses and ports as numbers.
794 Normally
795 .Nm
796 attempts to resolve addresses and ports,
797 and 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
821 The
822 .Nm
823 command appeared in
824 .Bx 4.2 .
825 .Pp
826 IPv6 support was added by WIDE/KAME project.
827 .Sh BUGS
828 The notion of errors is ill-defined.