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