11eaf0ac3Slogwang.\" Copyright (c) 1983, 1990, 1992, 1993 21eaf0ac3Slogwang.\" The Regents of the University of California. All rights reserved. 31eaf0ac3Slogwang.\" 41eaf0ac3Slogwang.\" Redistribution and use in source and binary forms, with or without 51eaf0ac3Slogwang.\" modification, are permitted provided that the following conditions 61eaf0ac3Slogwang.\" are met: 71eaf0ac3Slogwang.\" 1. Redistributions of source code must retain the above copyright 81eaf0ac3Slogwang.\" notice, this list of conditions and the following disclaimer. 91eaf0ac3Slogwang.\" 2. Redistributions in binary form must reproduce the above copyright 101eaf0ac3Slogwang.\" notice, this list of conditions and the following disclaimer in the 111eaf0ac3Slogwang.\" documentation and/or other materials provided with the distribution. 12*22ce4affSfengbojiang.\" 3. Neither the name of the University nor the names of its contributors 131eaf0ac3Slogwang.\" may be used to endorse or promote products derived from this software 141eaf0ac3Slogwang.\" without specific prior written permission. 151eaf0ac3Slogwang.\" 161eaf0ac3Slogwang.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 171eaf0ac3Slogwang.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181eaf0ac3Slogwang.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191eaf0ac3Slogwang.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 201eaf0ac3Slogwang.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211eaf0ac3Slogwang.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221eaf0ac3Slogwang.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231eaf0ac3Slogwang.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241eaf0ac3Slogwang.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251eaf0ac3Slogwang.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261eaf0ac3Slogwang.\" SUCH DAMAGE. 271eaf0ac3Slogwang.\" 281eaf0ac3Slogwang.\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 291eaf0ac3Slogwang.\" $FreeBSD$ 301eaf0ac3Slogwang.\" 31*22ce4affSfengbojiang.Dd September 25, 2020 321eaf0ac3Slogwang.Dt NETSTAT 1 331eaf0ac3Slogwang.Os 341eaf0ac3Slogwang.Sh NAME 351eaf0ac3Slogwang.Nm netstat 361eaf0ac3Slogwang.Nd show network status and statistics 371eaf0ac3Slogwang.Sh SYNOPSIS 381eaf0ac3Slogwang.Bk -words 391eaf0ac3Slogwang.Bl -tag -width "netstat" 401eaf0ac3Slogwang.It Nm 411eaf0ac3Slogwang.Op Fl -libxo 42*22ce4affSfengbojiang.Op Fl 46AaCLnPRSTWx 431eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 441eaf0ac3Slogwang.Op Fl M Ar core 451eaf0ac3Slogwang.Op Fl N Ar system 461eaf0ac3Slogwang.It Nm Fl i | I Ar interface 471eaf0ac3Slogwang.Op Fl -libxo 481eaf0ac3Slogwang.Op Fl 46abdhnW 491eaf0ac3Slogwang.Op Fl f Ar address_family 501eaf0ac3Slogwang.Op Fl M Ar core 511eaf0ac3Slogwang.Op Fl N Ar system 521eaf0ac3Slogwang.It Nm Fl w Ar wait 531eaf0ac3Slogwang.Op Fl -libxo 541eaf0ac3Slogwang.Op Fl I Ar interface 551eaf0ac3Slogwang.Op Fl 46d 561eaf0ac3Slogwang.Op Fl M Ar core 571eaf0ac3Slogwang.Op Fl N Ar system 581eaf0ac3Slogwang.Op Fl q Ar howmany 591eaf0ac3Slogwang.It Nm Fl s 601eaf0ac3Slogwang.Op Fl -libxo 611eaf0ac3Slogwang.Op Fl 46sz 621eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 631eaf0ac3Slogwang.Op Fl M Ar core 641eaf0ac3Slogwang.Op Fl N Ar system 651eaf0ac3Slogwang.It Nm Fl i | I Ar interface Fl s 661eaf0ac3Slogwang.Op Fl -libxo 671eaf0ac3Slogwang.Op Fl 46s 681eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 691eaf0ac3Slogwang.Op Fl M Ar core 701eaf0ac3Slogwang.Op Fl N Ar system 711eaf0ac3Slogwang.It Nm Fl m 721eaf0ac3Slogwang.Op Fl -libxo 731eaf0ac3Slogwang.Op Fl M Ar core 741eaf0ac3Slogwang.Op Fl N Ar system 751eaf0ac3Slogwang.It Nm Fl B 761eaf0ac3Slogwang.Op Fl -libxo 771eaf0ac3Slogwang.Op Fl z 781eaf0ac3Slogwang.Op Fl I Ar interface 791eaf0ac3Slogwang.It Nm Fl r 801eaf0ac3Slogwang.Op Fl -libxo 811eaf0ac3Slogwang.Op Fl 46nW 821eaf0ac3Slogwang.Op Fl F Ar fibnum 831eaf0ac3Slogwang.Op Fl f Ar address_family 841eaf0ac3Slogwang.It Nm Fl rs 851eaf0ac3Slogwang.Op Fl -libxo 861eaf0ac3Slogwang.Op Fl s 871eaf0ac3Slogwang.Op Fl M Ar core 881eaf0ac3Slogwang.Op Fl N Ar system 891eaf0ac3Slogwang.It Nm Fl g 901eaf0ac3Slogwang.Op Fl -libxo 911eaf0ac3Slogwang.Op Fl 46W 921eaf0ac3Slogwang.Op Fl f Ar address_family 931eaf0ac3Slogwang.It Nm Fl gs 941eaf0ac3Slogwang.Op Fl -libxo 951eaf0ac3Slogwang.Op Fl 46s 961eaf0ac3Slogwang.Op Fl f Ar address_family 971eaf0ac3Slogwang.Op Fl M Ar core 981eaf0ac3Slogwang.Op Fl N Ar system 991eaf0ac3Slogwang.It Nm Fl Q 1001eaf0ac3Slogwang.Op Fl -libxo 1011eaf0ac3Slogwang.El 1021eaf0ac3Slogwang.Ek 1031eaf0ac3Slogwang.Sh DESCRIPTION 1041eaf0ac3SlogwangThe 1051eaf0ac3Slogwang.Nm 1061eaf0ac3Slogwangcommand symbolically displays the contents of various network-related 1071eaf0ac3Slogwangdata structures. 1081eaf0ac3SlogwangThere are a number of output formats, 1091eaf0ac3Slogwangdepending on the options for the information presented. 1101eaf0ac3Slogwang.Bl -tag -width indent 1111eaf0ac3Slogwang.It Xo 1121eaf0ac3Slogwang.Bk -words 1131eaf0ac3Slogwang.Nm 114*22ce4affSfengbojiang.Op Fl 46AaCLnRSTWx 1151eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 1161eaf0ac3Slogwang.Op Fl M Ar core 1171eaf0ac3Slogwang.Op Fl N Ar system 1181eaf0ac3Slogwang.Ek 1191eaf0ac3Slogwang.Xc 1201eaf0ac3SlogwangDisplay a list of active sockets 1211eaf0ac3Slogwang(protocol control blocks) 1221eaf0ac3Slogwangfor each network protocol. 1231eaf0ac3Slogwang.Pp 1241eaf0ac3SlogwangThe default display for active sockets shows the local 1251eaf0ac3Slogwangand remote addresses, send and receive queue sizes (in bytes), protocol, 1261eaf0ac3Slogwangand the internal state of the protocol. 1271eaf0ac3SlogwangAddress formats are of the form 1281eaf0ac3Slogwang.Dq host.port 1291eaf0ac3Slogwangor 1301eaf0ac3Slogwang.Dq network.port 1311eaf0ac3Slogwangif a socket's address specifies a network but no specific host address. 1321eaf0ac3SlogwangWhen known, the host and network addresses are displayed symbolically 1331eaf0ac3Slogwangaccording to the databases 1341eaf0ac3Slogwang.Xr hosts 5 1351eaf0ac3Slogwangand 1361eaf0ac3Slogwang.Xr networks 5 , 1371eaf0ac3Slogwangrespectively. 1381eaf0ac3SlogwangIf a symbolic name for an address is unknown, or if 1391eaf0ac3Slogwangthe 1401eaf0ac3Slogwang.Fl n 1411eaf0ac3Slogwangoption is specified, the address is printed numerically, according 1421eaf0ac3Slogwangto the address family. 1431eaf0ac3SlogwangFor more information regarding 1441eaf0ac3Slogwangthe Internet IPv4 1451eaf0ac3Slogwang.Dq dot format , 1461eaf0ac3Slogwangrefer to 1471eaf0ac3Slogwang.Xr inet 3 . 1481eaf0ac3SlogwangUnspecified, 1491eaf0ac3Slogwangor 1501eaf0ac3Slogwang.Dq wildcard , 1511eaf0ac3Slogwangaddresses and ports appear as 1521eaf0ac3Slogwang.Dq Li * . 1531eaf0ac3Slogwang.Bl -tag -width indent 1541eaf0ac3Slogwang.It Fl -libxo 1551eaf0ac3SlogwangGenerate output via 1561eaf0ac3Slogwang.Xr libxo 3 1571eaf0ac3Slogwangin a selection of different human and machine readable formats. 1581eaf0ac3SlogwangSee 1591eaf0ac3Slogwang.Xr xo_parse_args 3 1601eaf0ac3Slogwangfor details on command line arguments. 1611eaf0ac3Slogwang.It Fl 4 1621eaf0ac3SlogwangShow IPv4 only. 1631eaf0ac3SlogwangSee 1641eaf0ac3Slogwang.Sx GENERAL OPTIONS . 1651eaf0ac3Slogwang.It Fl 6 1661eaf0ac3SlogwangShow IPv6 only. 1671eaf0ac3SlogwangSee 1681eaf0ac3Slogwang.Sx GENERAL OPTIONS . 1691eaf0ac3Slogwang.It Fl A 1701eaf0ac3SlogwangShow the address of a protocol control block (PCB) 1711eaf0ac3Slogwangassociated with a socket; used for debugging. 1721eaf0ac3Slogwang.It Fl a 1731eaf0ac3SlogwangShow the state of all sockets; 1741eaf0ac3Slogwangnormally sockets used by server processes are not shown. 175*22ce4affSfengbojiang.It Fl c 176*22ce4affSfengbojiangShow the used TCP stack for each session. 177*22ce4affSfengbojiang.It Fl C 178*22ce4affSfengbojiangShow the congestion control algorithm and diagnostic information of TCP sockets. 1791eaf0ac3Slogwang.It Fl L 1801eaf0ac3SlogwangShow the size of the various listen queues. 1811eaf0ac3SlogwangThe first count shows the number of unaccepted connections, 1821eaf0ac3Slogwangthe second count shows the amount of unaccepted incomplete connections, 1831eaf0ac3Slogwangand the third count is the maximum number of queued connections. 1841eaf0ac3Slogwang.It Fl n 1851eaf0ac3SlogwangDo not resolve numeric addresses and port numbers to names. 1861eaf0ac3SlogwangSee 1871eaf0ac3Slogwang.Sx GENERAL OPTIONS . 188*22ce4affSfengbojiang.It Fl P 189*22ce4affSfengbojiangDisplay the log ID for each socket. 1901eaf0ac3Slogwang.It Fl R 1911eaf0ac3SlogwangDisplay the flowid and flowtype for each socket. 1921eaf0ac3Slogwangflowid is a 32 bit hardware specific identifier for each flow. 1931eaf0ac3Slogwangflowtype defines which protocol fields are hashed to produce the id. 1941eaf0ac3SlogwangA complete listing is available in 1951eaf0ac3Slogwang.Pa sys/mbuf.h 1961eaf0ac3Slogwangunder 1971eaf0ac3Slogwang.Dv M_HASHTYPE_* . 1981eaf0ac3Slogwang.It Fl S 1991eaf0ac3SlogwangShow network addresses as numbers (as with 2001eaf0ac3Slogwang.Fl n ) 2011eaf0ac3Slogwangbut show ports symbolically. 2021eaf0ac3Slogwang.It Fl T 2031eaf0ac3SlogwangDisplay diagnostic information from the TCP control block. 2041eaf0ac3SlogwangFields include the number of packets requiring retransmission, 2051eaf0ac3Slogwangreceived out-of-order, and those advertising a zero-sized window. 2061eaf0ac3Slogwang.It Fl W 2071eaf0ac3SlogwangAvoid truncating addresses even if this causes some fields to overflow. 2081eaf0ac3Slogwang.It Fl x 2091eaf0ac3SlogwangDisplay socket buffer and TCP timer statistics for each 2101eaf0ac3Slogwanginternet socket. 2111eaf0ac3Slogwang.Pp 2121eaf0ac3SlogwangThe 2131eaf0ac3Slogwang.Fl x 2141eaf0ac3Slogwangflag causes 2151eaf0ac3Slogwang.Nm 2161eaf0ac3Slogwangto output all the information recorded about data 2171eaf0ac3Slogwangstored in the socket buffers. 2181eaf0ac3SlogwangThe fields are: 2191eaf0ac3Slogwang.Bl -column ".Li R-MBUF" 2201eaf0ac3Slogwang.It Li R-MBUF Ta Number of mbufs in the receive queue. 2211eaf0ac3Slogwang.It Li S-MBUF Ta Number of mbufs in the send queue. 2221eaf0ac3Slogwang.It Li R-CLUS Ta Number of clusters, of any type, in the receive 2231eaf0ac3Slogwangqueue. 2241eaf0ac3Slogwang.It Li S-CLUS Ta Number of clusters, of any type, in the send queue. 2251eaf0ac3Slogwang.It Li R-HIWA Ta Receive buffer high water mark, in bytes. 2261eaf0ac3Slogwang.It Li S-HIWA Ta Send buffer high water mark, in bytes. 2271eaf0ac3Slogwang.It Li R-LOWA Ta Receive buffer low water mark, in bytes. 2281eaf0ac3Slogwang.It Li S-LOWA Ta Send buffer low water mark, in bytes. 2291eaf0ac3Slogwang.It Li R-BCNT Ta Receive buffer byte count. 2301eaf0ac3Slogwang.It Li S-BCNT Ta Send buffer byte count. 2311eaf0ac3Slogwang.It Li R-BMAX Ta Maximum bytes that can be used in the receive buffer. 2321eaf0ac3Slogwang.It Li S-BMAX Ta Maximum bytes that can be used in the send buffer. 2331eaf0ac3Slogwang.It Li rexmt Ta Time, in seconds, to fire Retransmit Timer, or 0 if not armed. 2341eaf0ac3Slogwang.It Li persist Ta Time, in seconds, to fire Retransmit Persistence, or 0 if not armed. 2351eaf0ac3Slogwang.It Li keep Ta Time, in seconds, to fire Keep Alive, or 0 if not armed. 2361eaf0ac3Slogwang.It Li 2msl Ta Time, in seconds, to fire 2*msl TIME_WAIT Timer, or 0 if not armed. 2371eaf0ac3Slogwang.It Li delack Ta Time, in seconds, to fire Delayed ACK Timer, or 0 if not armed. 2381eaf0ac3Slogwang.It Li rcvtime Ta Time, in seconds, since last packet received. 2391eaf0ac3Slogwang.El 2401eaf0ac3Slogwang.It Fl f Ar protocol_family 2411eaf0ac3SlogwangFilter by 2421eaf0ac3Slogwang.Ar protocol_family . 2431eaf0ac3SlogwangSee 2441eaf0ac3Slogwang.Sx GENERAL OPTIONS . 2451eaf0ac3Slogwang.It Fl p Ar protocol 2461eaf0ac3SlogwangFilter by 2471eaf0ac3Slogwang.Ar protocol . 2481eaf0ac3SlogwangSee 2491eaf0ac3Slogwang.Sx GENERAL OPTIONS . 2501eaf0ac3Slogwang.It Fl M 2511eaf0ac3SlogwangUse an alternative core. 2521eaf0ac3SlogwangSee 2531eaf0ac3Slogwang.Sx GENERAL OPTIONS . 2541eaf0ac3Slogwang.It Fl N 2551eaf0ac3SlogwangUse an alternative kernel image. 2561eaf0ac3SlogwangSee 2571eaf0ac3Slogwang.Sx GENERAL OPTIONS . 2581eaf0ac3Slogwang.El 2591eaf0ac3Slogwang.It Xo 2601eaf0ac3Slogwang.Bk -words 2611eaf0ac3Slogwang.Nm 2621eaf0ac3Slogwang.Fl i | I Ar interface 2631eaf0ac3Slogwang.Op Fl 46abdhnW 2641eaf0ac3Slogwang.Op Fl f Ar address_family 2651eaf0ac3Slogwang.Op Fl M Ar core 2661eaf0ac3Slogwang.Op Fl N Ar system 2671eaf0ac3Slogwang.Ek 2681eaf0ac3Slogwang.Xc 2691eaf0ac3SlogwangShow the state of all network interfaces or a single 2701eaf0ac3Slogwang.Ar interface 2711eaf0ac3Slogwangwhich have been auto-configured 2721eaf0ac3Slogwang(interfaces statically configured into a system, but not 2731eaf0ac3Slogwanglocated at boot time are not shown). 2741eaf0ac3SlogwangAn asterisk 2751eaf0ac3Slogwang.Pq Dq Li * 2761eaf0ac3Slogwangafter an interface name indicates that the interface is 2771eaf0ac3Slogwang.Dq down . 2781eaf0ac3Slogwang.Pp 2791eaf0ac3SlogwangWhen 2801eaf0ac3Slogwang.Nm 2811eaf0ac3Slogwangis invoked with 2821eaf0ac3Slogwang.Fl i 2831eaf0ac3Slogwang.Pq all interfaces 2841eaf0ac3Slogwangor 2851eaf0ac3Slogwang.Fl I Ar interface , 2861eaf0ac3Slogwangit provides a table of cumulative 2871eaf0ac3Slogwangstatistics regarding packets transferred, errors, and collisions. 2881eaf0ac3SlogwangThe network addresses of the interface 2891eaf0ac3Slogwangand the maximum transmission unit 2901eaf0ac3Slogwang.Pq Dq mtu 2911eaf0ac3Slogwangare also displayed. 2921eaf0ac3Slogwang.Bl -tag -width indent 2931eaf0ac3Slogwang.It Fl 4 2941eaf0ac3SlogwangShow IPv4 only. 2951eaf0ac3SlogwangSee 2961eaf0ac3Slogwang.Sx GENERAL OPTIONS . 2971eaf0ac3Slogwang.It Fl 6 2981eaf0ac3SlogwangShow IPv6 only. 2991eaf0ac3SlogwangSee 3001eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3011eaf0ac3Slogwang.It Fl a 3021eaf0ac3SlogwangMulticast addresses currently in use are shown 3031eaf0ac3Slogwangfor each Ethernet interface and for each IP interface address. 3041eaf0ac3SlogwangMulticast addresses are shown on separate lines following the interface 3051eaf0ac3Slogwangaddress with which they are associated. 3061eaf0ac3Slogwang.It Fl b 3071eaf0ac3SlogwangShow the number of bytes in and out. 3081eaf0ac3Slogwang.It Fl d 3091eaf0ac3SlogwangShow the number of dropped packets. 3101eaf0ac3Slogwang.It Fl h 3111eaf0ac3SlogwangPrint all counters in human readable form. 3121eaf0ac3Slogwang.It Fl n 3131eaf0ac3SlogwangDo not resolve numeric addresses and port numbers to names. 3141eaf0ac3SlogwangSee 3151eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3161eaf0ac3Slogwang.It Fl W 3171eaf0ac3SlogwangAvoid truncating interface names even if this causes some fields to overflow. 3181eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3191eaf0ac3Slogwang.It Fl f Ar protocol_family 3201eaf0ac3SlogwangFilter by 3211eaf0ac3Slogwang.Ar protocol_family . 3221eaf0ac3SlogwangSee 3231eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3241eaf0ac3Slogwang.El 3251eaf0ac3Slogwang.It Xo 3261eaf0ac3Slogwang.Bk -words 3271eaf0ac3Slogwang.Nm 3281eaf0ac3Slogwang.Fl w Ar wait 3291eaf0ac3Slogwang.Op Fl I Ar interface 3301eaf0ac3Slogwang.Op Fl 46d 3311eaf0ac3Slogwang.Op Fl M Ar core 3321eaf0ac3Slogwang.Op Fl N Ar system 3331eaf0ac3Slogwang.Op Fl q Ar howmany 3341eaf0ac3Slogwang.Ek 3351eaf0ac3Slogwang.Xc 3361eaf0ac3SlogwangAt intervals of 3371eaf0ac3Slogwang.Ar wait 3381eaf0ac3Slogwangseconds, display the information regarding packet traffic on all 3391eaf0ac3Slogwangconfigured network interfaces or a single 3401eaf0ac3Slogwang.Ar interface . 3411eaf0ac3Slogwang.Pp 3421eaf0ac3SlogwangWhen 3431eaf0ac3Slogwang.Nm 3441eaf0ac3Slogwangis invoked with the 3451eaf0ac3Slogwang.Fl w 3461eaf0ac3Slogwangoption and a 3471eaf0ac3Slogwang.Ar wait 3481eaf0ac3Slogwanginterval argument, it displays a running count of statistics related to 3491eaf0ac3Slogwangnetwork interfaces. 3501eaf0ac3SlogwangAn obsolescent version of this option used a numeric parameter 3511eaf0ac3Slogwangwith no option, and is currently supported for backward compatibility. 3521eaf0ac3SlogwangBy default, this display summarizes information for all interfaces. 3531eaf0ac3SlogwangInformation for a specific interface may be displayed with the 3541eaf0ac3Slogwang.Fl I Ar interface 3551eaf0ac3Slogwangoption. 3561eaf0ac3Slogwang.Bl -tag -width indent 3571eaf0ac3Slogwang.It Fl I Ar interface 3581eaf0ac3SlogwangOnly show information regarding 3591eaf0ac3Slogwang.Ar interface 3601eaf0ac3Slogwang.It Fl 4 3611eaf0ac3SlogwangShow IPv4 only. 3621eaf0ac3SlogwangSee 3631eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3641eaf0ac3Slogwang.It Fl 6 3651eaf0ac3SlogwangShow IPv6 only. 3661eaf0ac3SlogwangSee 3671eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3681eaf0ac3Slogwang.It Fl d 3691eaf0ac3SlogwangShow the number of dropped packets. 3701eaf0ac3Slogwang.It Fl M 3711eaf0ac3SlogwangUse an alternative core. 3721eaf0ac3SlogwangSee 3731eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3741eaf0ac3Slogwang.It Fl N 3751eaf0ac3SlogwangUse an alternative kernel image. 3761eaf0ac3SlogwangSee 3771eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3781eaf0ac3Slogwang.It Fl q 3791eaf0ac3SlogwangExit after 3801eaf0ac3Slogwang.Ar howmany 3811eaf0ac3Slogwangoutputs. 3821eaf0ac3Slogwang.El 3831eaf0ac3Slogwang.It Xo 3841eaf0ac3Slogwang.Bk -words 3851eaf0ac3Slogwang.Nm 3861eaf0ac3Slogwang.Fl s 3871eaf0ac3Slogwang.Op Fl 46sz 3881eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 3891eaf0ac3Slogwang.Op Fl M Ar core 3901eaf0ac3Slogwang.Op Fl N Ar system 3911eaf0ac3Slogwang.Ek 3921eaf0ac3Slogwang.Xc 3931eaf0ac3SlogwangDisplay system-wide statistics for each network protocol. 3941eaf0ac3Slogwang.Bl -tag -width indent 3951eaf0ac3Slogwang.It Fl 4 3961eaf0ac3SlogwangShow IPv4 only. 3971eaf0ac3SlogwangSee 3981eaf0ac3Slogwang.Sx GENERAL OPTIONS . 3991eaf0ac3Slogwang.It Fl 6 4001eaf0ac3SlogwangShow IPv6 only. 4011eaf0ac3SlogwangSee 4021eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4031eaf0ac3Slogwang.It Fl s 4041eaf0ac3SlogwangIf 4051eaf0ac3Slogwang.Fl s 4061eaf0ac3Slogwangis repeated, counters with a value of zero are suppressed. 4071eaf0ac3Slogwang.It Fl z 4081eaf0ac3SlogwangReset statistic counters after displaying them. 4091eaf0ac3Slogwang.It Fl f Ar protocol_family 4101eaf0ac3SlogwangFilter by 4111eaf0ac3Slogwang.Ar protocol_family . 4121eaf0ac3SlogwangSee 4131eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4141eaf0ac3Slogwang.It Fl p Ar protocol 4151eaf0ac3SlogwangFilter by 4161eaf0ac3Slogwang.Ar protocol . 4171eaf0ac3SlogwangSee 4181eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4191eaf0ac3Slogwang.It Fl M 4201eaf0ac3SlogwangUse an alternative core. 4211eaf0ac3SlogwangSee 4221eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4231eaf0ac3Slogwang.It Fl N 4241eaf0ac3SlogwangUse an alternative kernel image 4251eaf0ac3SlogwangSee 4261eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4271eaf0ac3Slogwang.El 4281eaf0ac3Slogwang.It Xo 4291eaf0ac3Slogwang.Bk -words 4301eaf0ac3Slogwang.Nm 4311eaf0ac3Slogwang.Fl i | I Ar interface Fl s 4321eaf0ac3Slogwang.Op Fl 46s 4331eaf0ac3Slogwang.Op Fl f Ar protocol_family | Fl p Ar protocol 4341eaf0ac3Slogwang.Op Fl M Ar core 4351eaf0ac3Slogwang.Op Fl N Ar system 4361eaf0ac3Slogwang.Ek 4371eaf0ac3Slogwang.Xc 4381eaf0ac3SlogwangDisplay per-interface statistics for each network protocol. 4391eaf0ac3Slogwang.Bl -tag -width indent 4401eaf0ac3Slogwang.It Fl 4 4411eaf0ac3SlogwangShow IPv4 only 4421eaf0ac3SlogwangSee 4431eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4441eaf0ac3Slogwang.It Fl 6 4451eaf0ac3SlogwangShow IPv6 only 4461eaf0ac3SlogwangSee 4471eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4481eaf0ac3Slogwang.It Fl s 4491eaf0ac3SlogwangIf 4501eaf0ac3Slogwang.Fl s 4511eaf0ac3Slogwangis repeated, counters with a value of zero are suppressed. 4521eaf0ac3Slogwang.It Fl f Ar protocol_family 4531eaf0ac3SlogwangFilter by 4541eaf0ac3Slogwang.Ar protocol_family . 4551eaf0ac3SlogwangSee 4561eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4571eaf0ac3Slogwang.It Fl p Ar protocol 4581eaf0ac3SlogwangFilter by 4591eaf0ac3Slogwang.Ar protocol . 4601eaf0ac3SlogwangSee 4611eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4621eaf0ac3Slogwang.It Fl M 4631eaf0ac3SlogwangUse an alternative core 4641eaf0ac3SlogwangSee 4651eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4661eaf0ac3Slogwang.It Fl N 4671eaf0ac3SlogwangUse an alternative kernel image 4681eaf0ac3SlogwangSee 4691eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4701eaf0ac3Slogwang.El 4711eaf0ac3Slogwang.It Xo 4721eaf0ac3Slogwang.Bk -words 4731eaf0ac3Slogwang.Nm 4741eaf0ac3Slogwang.Fl m 4751eaf0ac3Slogwang.Op Fl M Ar core 4761eaf0ac3Slogwang.Op Fl N Ar system 4771eaf0ac3Slogwang.Ek 4781eaf0ac3Slogwang.Xc 4791eaf0ac3SlogwangShow statistics recorded by the memory management routines 4801eaf0ac3Slogwang.Pq Xr mbuf 9 . 4811eaf0ac3SlogwangThe network manages a private pool of memory buffers. 4821eaf0ac3Slogwang.Bl -tag -width indent 4831eaf0ac3Slogwang.It Fl M 4841eaf0ac3SlogwangUse an alternative core 4851eaf0ac3SlogwangSee 4861eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4871eaf0ac3Slogwang.It Fl N 4881eaf0ac3SlogwangUse an alternative kernel image 4891eaf0ac3SlogwangSee 4901eaf0ac3Slogwang.Sx GENERAL OPTIONS . 4911eaf0ac3Slogwang.El 4921eaf0ac3Slogwang.It Xo 4931eaf0ac3Slogwang.Bk -words 4941eaf0ac3Slogwang.Nm 4951eaf0ac3Slogwang.Fl B 4961eaf0ac3Slogwang.Op Fl z 4971eaf0ac3Slogwang.Op Fl I Ar interface 4981eaf0ac3Slogwang.Ek 4991eaf0ac3Slogwang.Xc 5001eaf0ac3SlogwangShow statistics about 5011eaf0ac3Slogwang.Xr bpf 4 5021eaf0ac3Slogwangpeers. 5031eaf0ac3SlogwangThis includes information like 5041eaf0ac3Slogwanghow many packets have been matched, dropped and received by the 5051eaf0ac3Slogwangbpf device, also information about current buffer sizes and device 5061eaf0ac3Slogwangstates. 5071eaf0ac3Slogwang.Pp 5081eaf0ac3SlogwangThe 5091eaf0ac3Slogwang.Xr bpf 4 5101eaf0ac3Slogwangflags displayed when 5111eaf0ac3Slogwang.Nm 5121eaf0ac3Slogwangis invoked with the 5131eaf0ac3Slogwang.Fl B 5141eaf0ac3Slogwangoption represent the underlying parameters of the bpf peer. 5151eaf0ac3SlogwangEach flag is 5161eaf0ac3Slogwangrepresented as a single lower case letter. 5171eaf0ac3SlogwangThe mapping between the letters and flags in order of appearance are: 5181eaf0ac3Slogwang.Bl -column ".Li i" 5191eaf0ac3Slogwang.It Li p Ta Set if listening promiscuously 5201eaf0ac3Slogwang.It Li i Ta Dv BIOCIMMEDIATE No has been set on the device 5211eaf0ac3Slogwang.It Li f Ta Dv BIOCGHDRCMPLT No status: source link addresses are being 5221eaf0ac3Slogwangfilled automatically 5231eaf0ac3Slogwang.It Li s Ta Dv BIOCGSEESENT No status: see packets originating locally and 5241eaf0ac3Slogwangremotely on the interface. 5251eaf0ac3Slogwang.It Li a Ta Packet reception generates a signal 5261eaf0ac3Slogwang.It Li l Ta Dv BIOCLOCK No status: descriptor has been locked 5271eaf0ac3Slogwang.El 5281eaf0ac3Slogwang.Pp 5291eaf0ac3SlogwangFor more information about these flags, please refer to 5301eaf0ac3Slogwang.Xr bpf 4 . 5311eaf0ac3Slogwang.Bl -tag -width indent 5321eaf0ac3Slogwang.It Fl z 5331eaf0ac3SlogwangReset statistic counters after displaying them. 5341eaf0ac3Slogwang.El 5351eaf0ac3Slogwang.It Xo 5361eaf0ac3Slogwang.Bk -words 5371eaf0ac3Slogwang.Nm 5381eaf0ac3Slogwang.Fl r 5391eaf0ac3Slogwang.Op Fl 46AnW 5401eaf0ac3Slogwang.Op Fl F Ar fibnum 5411eaf0ac3Slogwang.Op Fl f Ar address_family 5421eaf0ac3Slogwang.Op Fl M Ar core 5431eaf0ac3Slogwang.Op Fl N Ar system 5441eaf0ac3Slogwang.Ek 5451eaf0ac3Slogwang.Xc 5461eaf0ac3SlogwangDisplay the contents of routing tables. 5471eaf0ac3Slogwang.Pp 5481eaf0ac3SlogwangWhen 5491eaf0ac3Slogwang.Nm 5501eaf0ac3Slogwangis invoked with the routing table option 5511eaf0ac3Slogwang.Fl r , 5521eaf0ac3Slogwangit lists the available routes and their status. 5531eaf0ac3SlogwangEach route consists of a destination host or network, and a gateway to use 5541eaf0ac3Slogwangin forwarding packets. 5551eaf0ac3SlogwangThe flags field shows a collection of information about the route stored 5561eaf0ac3Slogwangas binary choices. 5571eaf0ac3SlogwangThe individual flags are discussed in more detail in the 5581eaf0ac3Slogwang.Xr route 8 5591eaf0ac3Slogwangand 5601eaf0ac3Slogwang.Xr route 4 5611eaf0ac3Slogwangmanual pages. 5621eaf0ac3SlogwangThe mapping between letters and flags is: 5631eaf0ac3Slogwang.Bl -column ".Li W" ".Dv RTF_WASCLONED" 5641eaf0ac3Slogwang.It Li 1 Ta Dv RTF_PROTO1 Ta "Protocol specific routing flag #1" 5651eaf0ac3Slogwang.It Li 2 Ta Dv RTF_PROTO2 Ta "Protocol specific routing flag #2" 5661eaf0ac3Slogwang.It Li 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3" 5671eaf0ac3Slogwang.It Li B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)" 5681eaf0ac3Slogwang.It Li b Ta Dv RTF_BROADCAST Ta "The route represents a broadcast address" 5691eaf0ac3Slogwang.It Li D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)" 5701eaf0ac3Slogwang.It Li G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary" 5711eaf0ac3Slogwang.It Li H Ta Dv RTF_HOST Ta "Host entry (net otherwise)" 5721eaf0ac3Slogwang.It Li L Ta Dv RTF_LLINFO Ta "Valid protocol to link address translation" 5731eaf0ac3Slogwang.It Li M Ta Dv RTF_MODIFIED Ta "Modified dynamically (by redirect)" 5741eaf0ac3Slogwang.It Li R Ta Dv RTF_REJECT Ta "Host or net unreachable" 5751eaf0ac3Slogwang.It Li S Ta Dv RTF_STATIC Ta "Manually added" 5761eaf0ac3Slogwang.It Li U Ta Dv RTF_UP Ta "Route usable" 5771eaf0ac3Slogwang.It Li X Ta Dv RTF_XRESOLVE Ta "External daemon translates proto to link address" 5781eaf0ac3Slogwang.El 5791eaf0ac3Slogwang.Pp 5801eaf0ac3SlogwangDirect routes are created for each 5811eaf0ac3Slogwanginterface attached to the local host; 5821eaf0ac3Slogwangthe gateway field for such entries shows the address of the outgoing interface. 5831eaf0ac3SlogwangThe refcnt field gives the 5841eaf0ac3Slogwangcurrent number of active uses of the route. 5851eaf0ac3SlogwangConnection oriented 5861eaf0ac3Slogwangprotocols normally hold on to a single route for the duration of 5871eaf0ac3Slogwanga connection while connectionless protocols obtain a route while sending 5881eaf0ac3Slogwangto the same destination. 5891eaf0ac3SlogwangThe use field provides a count of the number of packets 5901eaf0ac3Slogwangsent using that route. 5911eaf0ac3SlogwangThe interface entry indicates the network interface utilized for the route. 5921eaf0ac3Slogwang.Bl -tag -width indent 5931eaf0ac3Slogwang.It Fl 4 5941eaf0ac3SlogwangShow IPv4 only. 5951eaf0ac3SlogwangSee 5961eaf0ac3Slogwang.Sx GENERAL OPTIONS . 5971eaf0ac3Slogwang.It Fl 6 5981eaf0ac3SlogwangShow IPv6 only. 5991eaf0ac3SlogwangSee 6001eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6011eaf0ac3Slogwang.It Fl n 6021eaf0ac3SlogwangDo not resolve numeric addresses and port numbers to names. 6031eaf0ac3SlogwangSee 6041eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6051eaf0ac3Slogwang.It Fl W 6061eaf0ac3SlogwangShow the path MTU for each route, and print interface names with a 6071eaf0ac3Slogwangwider field size. 6081eaf0ac3Slogwang.It Fl F 6091eaf0ac3SlogwangDisplay the routing table with the number 6101eaf0ac3Slogwang.Ar fibnum . 6111eaf0ac3SlogwangIf the specified 6121eaf0ac3Slogwang.Ar fibnum 6131eaf0ac3Slogwangis -1 or 6141eaf0ac3Slogwang.Fl F 6151eaf0ac3Slogwangis not specified, 6161eaf0ac3Slogwangthe default routing table is displayed. 6171eaf0ac3Slogwang.It Fl f 6181eaf0ac3SlogwangDisplay the routing table for a particular 6191eaf0ac3Slogwang.Ar address_family . 6201eaf0ac3Slogwang.It Fl M 6211eaf0ac3SlogwangUse an alternative core 6221eaf0ac3SlogwangSee 6231eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6241eaf0ac3Slogwang.It Fl N 6251eaf0ac3SlogwangUse an alternative kernel image 6261eaf0ac3SlogwangSee 6271eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6281eaf0ac3Slogwang.El 6291eaf0ac3Slogwang.It Xo 6301eaf0ac3Slogwang.Bk -words 6311eaf0ac3Slogwang.Nm 6321eaf0ac3Slogwang.Fl rs 6331eaf0ac3Slogwang.Op Fl s 6341eaf0ac3Slogwang.Op Fl M Ar core 6351eaf0ac3Slogwang.Op Fl N Ar system 6361eaf0ac3Slogwang.Ek 6371eaf0ac3Slogwang.Xc 6381eaf0ac3SlogwangDisplay routing statistics. 6391eaf0ac3Slogwang.Bl -tag -width indent 6401eaf0ac3Slogwang.It Fl s 6411eaf0ac3SlogwangIf 6421eaf0ac3Slogwang.Fl s 6431eaf0ac3Slogwangis repeated, counters with a value of zero are suppressed. 6441eaf0ac3Slogwang.It Fl M 6451eaf0ac3SlogwangUse an alternative core 6461eaf0ac3SlogwangSee 6471eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6481eaf0ac3Slogwang.It Fl N 6491eaf0ac3SlogwangUse an alternative kernel image 6501eaf0ac3SlogwangSee 6511eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6521eaf0ac3Slogwang.El 6531eaf0ac3Slogwang.It Xo 6541eaf0ac3Slogwang.Bk -words 6551eaf0ac3Slogwang.Nm 6561eaf0ac3Slogwang.Fl g 6571eaf0ac3Slogwang.Op Fl 46W 6581eaf0ac3Slogwang.Op Fl f Ar address_family 6591eaf0ac3Slogwang.Op Fl M Ar core 6601eaf0ac3Slogwang.Op Fl N Ar system 6611eaf0ac3Slogwang.Ek 6621eaf0ac3Slogwang.Xc 6631eaf0ac3SlogwangDisplay the contents of the multicast virtual interface tables, 6641eaf0ac3Slogwangand multicast forwarding caches. 6651eaf0ac3SlogwangEntries in these tables will appear only when the kernel is 6661eaf0ac3Slogwangactively forwarding multicast sessions. 6671eaf0ac3SlogwangThis option is applicable only to the 6681eaf0ac3Slogwang.Cm inet 6691eaf0ac3Slogwangand 6701eaf0ac3Slogwang.Cm inet6 6711eaf0ac3Slogwangaddress families. 6721eaf0ac3Slogwang.Bl -tag -width indent 6731eaf0ac3Slogwang.It Fl 4 6741eaf0ac3SlogwangShow IPv4 only 6751eaf0ac3SlogwangSee 6761eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6771eaf0ac3Slogwang.It Fl 6 6781eaf0ac3SlogwangShow IPv6 only 6791eaf0ac3SlogwangSee 6801eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6811eaf0ac3Slogwang.It Fl W 6821eaf0ac3SlogwangAvoid truncating addresses even if this causes some fields to overflow. 6831eaf0ac3Slogwang.It Fl f Ar protocol_family 6841eaf0ac3SlogwangFilter by 6851eaf0ac3Slogwang.Ar protocol_family . 6861eaf0ac3SlogwangSee 6871eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6881eaf0ac3Slogwang.It Fl M 6891eaf0ac3SlogwangUse an alternative core 6901eaf0ac3SlogwangSee 6911eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6921eaf0ac3Slogwang.It Fl N 6931eaf0ac3SlogwangUse an alternative kernel image 6941eaf0ac3SlogwangSee 6951eaf0ac3Slogwang.Sx GENERAL OPTIONS . 6961eaf0ac3Slogwang.El 6971eaf0ac3Slogwang.It Xo 6981eaf0ac3Slogwang.Bk -words 6991eaf0ac3Slogwang.Nm 7001eaf0ac3Slogwang.Fl gs 7011eaf0ac3Slogwang.Op Fl 46s 7021eaf0ac3Slogwang.Op Fl f Ar address_family 7031eaf0ac3Slogwang.Op Fl M Ar core 7041eaf0ac3Slogwang.Op Fl N Ar system 7051eaf0ac3Slogwang.Ek 7061eaf0ac3Slogwang.Xc 7071eaf0ac3SlogwangShow multicast routing statistics. 7081eaf0ac3Slogwang.Bl -tag -width indent 7091eaf0ac3Slogwang.It Fl 4 7101eaf0ac3SlogwangShow IPv4 only 7111eaf0ac3SlogwangSee 7121eaf0ac3Slogwang.Sx GENERAL OPTIONS . 7131eaf0ac3Slogwang.It Fl 6 7141eaf0ac3SlogwangShow IPv6 only 7151eaf0ac3SlogwangSee 7161eaf0ac3Slogwang.Sx GENERAL OPTIONS . 7171eaf0ac3Slogwang.It Fl s 7181eaf0ac3SlogwangIf 7191eaf0ac3Slogwang.Fl s 7201eaf0ac3Slogwangis repeated, counters with a value of zero are suppressed. 7211eaf0ac3Slogwang.It Fl f Ar protocol_family 7221eaf0ac3SlogwangFilter by 7231eaf0ac3Slogwang.Ar protocol_family . 7241eaf0ac3SlogwangSee 7251eaf0ac3Slogwang.Sx GENERAL OPTIONS . 7261eaf0ac3Slogwang.It Fl M 7271eaf0ac3SlogwangUse an alternative core 7281eaf0ac3SlogwangSee 7291eaf0ac3Slogwang.Sx GENERAL OPTIONS . 7301eaf0ac3Slogwang.It Fl N 7311eaf0ac3SlogwangUse an alternative kernel image 7321eaf0ac3SlogwangSee 7331eaf0ac3Slogwang.Sx GENERAL OPTIONS . 7341eaf0ac3Slogwang.El 7351eaf0ac3Slogwang.It Xo 7361eaf0ac3Slogwang.Bk -words 7371eaf0ac3Slogwang.Nm 7381eaf0ac3Slogwang.Fl Q 7391eaf0ac3Slogwang.Ek 7401eaf0ac3Slogwang.Xc 7411eaf0ac3SlogwangShow 7421eaf0ac3Slogwang.Xr netisr 9 7431eaf0ac3Slogwangstatistics. 7441eaf0ac3SlogwangThe flags field shows available ISR handlers: 7451eaf0ac3Slogwang.Bl -column ".Li W" ".Dv NETISR_SNP_FLAGS_DRAINEDCPU" 7461eaf0ac3Slogwang.It Li C Ta Dv NETISR_SNP_FLAGS_M2CPUID Ta "Able to map mbuf to cpu id" 7471eaf0ac3Slogwang.It Li D Ta Dv NETISR_SNP_FLAGS_DRAINEDCPU Ta "Has queue drain handler" 7481eaf0ac3Slogwang.It Li F Ta Dv NETISR_SNP_FLAGS_M2FLOW Ta "Able to map mbuf to flow id" 7491eaf0ac3Slogwang.El 7501eaf0ac3Slogwang.El 7511eaf0ac3Slogwang.Ss GENERAL OPTIONS 7521eaf0ac3SlogwangSome options have the general meaning: 7531eaf0ac3Slogwang.Bl -tag -width flag 7541eaf0ac3Slogwang.It Fl 4 7551eaf0ac3SlogwangIs shorthand for 7561eaf0ac3Slogwang.Fl f 7571eaf0ac3Slogwang.Ar inet 7581eaf0ac3Slogwang.Pq Show only IPv4 7591eaf0ac3Slogwang.It Fl 6 7601eaf0ac3SlogwangIs shorthand for 7611eaf0ac3Slogwang.Fl f 7621eaf0ac3Slogwang.Ar inet6 7631eaf0ac3Slogwang.Pq Show only IPv6 7641eaf0ac3Slogwang.It Fl f Ar address_family , Fl p Ar protocol 7651eaf0ac3SlogwangLimit display to those records 7661eaf0ac3Slogwangof the specified 7671eaf0ac3Slogwang.Ar address_family 7681eaf0ac3Slogwangor a single 7691eaf0ac3Slogwang.Ar protocol . 7701eaf0ac3SlogwangThe following address families and protocols are recognized: 7711eaf0ac3Slogwang.Pp 7721eaf0ac3Slogwang.Bl -tag -width ".Cm netgraph , ng Pq Dv AF_NETGRAPH" -compact 7731eaf0ac3Slogwang.It Em Family 7741eaf0ac3Slogwang.Em Protocols 7751eaf0ac3Slogwang.It Cm inet Pq Dv AF_INET 7761eaf0ac3Slogwang.Cm divert , icmp , igmp , ip , ipsec , pim, sctp , tcp , udp 7771eaf0ac3Slogwang.It Cm inet6 Pq Dv AF_INET6 778*22ce4affSfengbojiang.Cm icmp6 , ip6 , ipsec6 , rip6 , sctp , tcp , udp 7791eaf0ac3Slogwang.It Cm pfkey Pq Dv PF_KEY 7801eaf0ac3Slogwang.Cm pfkey 7811eaf0ac3Slogwang.It Cm netgraph , ng Pq Dv AF_NETGRAPH 7821eaf0ac3Slogwang.Cm ctrl , data 7831eaf0ac3Slogwang.It Cm unix Pq Dv AF_UNIX 7841eaf0ac3Slogwang.It Cm link Pq Dv AF_LINK 7851eaf0ac3Slogwang.El 7861eaf0ac3Slogwang.Pp 7871eaf0ac3SlogwangThe program will complain if 7881eaf0ac3Slogwang.Ar protocol 7891eaf0ac3Slogwangis unknown or if there is no statistics routine for it. 7901eaf0ac3Slogwang.It Fl M 7911eaf0ac3SlogwangExtract values associated with the name list from the specified core 7921eaf0ac3Slogwanginstead of the default 7931eaf0ac3Slogwang.Pa /dev/kmem . 7941eaf0ac3Slogwang.It Fl N 7951eaf0ac3SlogwangExtract the name list from the specified system instead of the default, 7961eaf0ac3Slogwangwhich is the kernel image the system has booted from. 7971eaf0ac3Slogwang.It Fl n 7981eaf0ac3SlogwangShow network addresses and ports as numbers. 7991eaf0ac3SlogwangNormally 8001eaf0ac3Slogwang.Nm 8011eaf0ac3Slogwangattempts to resolve addresses and ports, 8021eaf0ac3Slogwangand display them symbolically. 8031eaf0ac3Slogwang.El 804*22ce4affSfengbojiang.Sh EXAMPLES 805*22ce4affSfengbojiangShow packet traffic information (packets, bytes, errors, packet drops, etc) for 806*22ce4affSfengbojianginterface re0 updated every 2 seconds and exit after 5 outputs: 807*22ce4affSfengbojiang.Bd -literal -offset indent 808*22ce4affSfengbojiang$ netstat -w 2 -q 5 -I re0 809*22ce4affSfengbojiang.Ed 810*22ce4affSfengbojiang.Pp 811*22ce4affSfengbojiangShow statistics for ICMP on any interface: 812*22ce4affSfengbojiang.Bd -literal -offset indent 813*22ce4affSfengbojiang$ netstat -s -p icmp 814*22ce4affSfengbojiang.Ed 815*22ce4affSfengbojiang.Pp 816*22ce4affSfengbojiangShow routing tables: 817*22ce4affSfengbojiang.Bd -literal -offset indent 818*22ce4affSfengbojiang$ netstat -r 819*22ce4affSfengbojiang.Ed 820*22ce4affSfengbojiang.Pp 821*22ce4affSfengbojiangSame as above, but without resolving numeric addresses and port numbers to 822*22ce4affSfengbojiangnames: 823*22ce4affSfengbojiang.Bd -literal -offset indent 824*22ce4affSfengbojiang$ netstat -rn 825*22ce4affSfengbojiang.Ed 8261eaf0ac3Slogwang.Sh SEE ALSO 8271eaf0ac3Slogwang.Xr fstat 1 , 8281eaf0ac3Slogwang.Xr nfsstat 1 , 8291eaf0ac3Slogwang.Xr procstat 1 , 8301eaf0ac3Slogwang.Xr ps 1 , 8311eaf0ac3Slogwang.Xr sockstat 1 , 8321eaf0ac3Slogwang.Xr libxo 3 , 8331eaf0ac3Slogwang.Xr xo_parse_args 3 , 8341eaf0ac3Slogwang.Xr bpf 4 , 8351eaf0ac3Slogwang.Xr inet 4 , 8361eaf0ac3Slogwang.Xr route 4 , 8371eaf0ac3Slogwang.Xr unix 4 , 8381eaf0ac3Slogwang.Xr hosts 5 , 8391eaf0ac3Slogwang.Xr networks 5 , 8401eaf0ac3Slogwang.Xr protocols 5 , 8411eaf0ac3Slogwang.Xr services 5 , 8421eaf0ac3Slogwang.Xr iostat 8 , 8431eaf0ac3Slogwang.Xr route 8 , 8441eaf0ac3Slogwang.Xr trpt 8 , 8451eaf0ac3Slogwang.Xr vmstat 8 , 8461eaf0ac3Slogwang.Xr mbuf 9 8471eaf0ac3Slogwang.Sh HISTORY 8481eaf0ac3SlogwangThe 8491eaf0ac3Slogwang.Nm 8501eaf0ac3Slogwangcommand appeared in 8511eaf0ac3Slogwang.Bx 4.2 . 8521eaf0ac3Slogwang.Pp 8531eaf0ac3SlogwangIPv6 support was added by WIDE/KAME project. 8541eaf0ac3Slogwang.Sh BUGS 8551eaf0ac3SlogwangThe notion of errors is ill-defined. 856