Main index | Section 1 | 日本語 | Options |
netstat | |
[ | |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
Fl |
[ |
netstat
[
The default display for active sockets shows the local
and remote addresses, send and receive queue sizes (in bytes), protocol,
and the internal state of the protocol.
Address formats are of the form
"host.port"
or
"network.port"
if a socket's address specifies a network but no specific host address.
When known, the host and network addresses are displayed symbolically
according to the databases
hosts(5)
and
networks(5),
respectively.
If a symbolic name for an address is unknown, or if
the
| |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Generate output via libxo(3) in a selection of different human and machine readable formats. See xo_parse_args(3) for details on command line arguments. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show IPv4 only. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show IPv6 only. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show the address of a protocol control block (PCB) associated with a socket; used for debugging. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show the state of all sockets; normally sockets used by server processes are not shown. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show the used TCP stack for each session. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show the congestion control algorithm and diagnostic information of TCP sockets. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show the size of the various listen queues. The first count shows the number of unaccepted connections, the second count shows the amount of unaccepted incomplete connections, and the third count is the maximum number of queued connections. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Do not resolve numeric addresses and port numbers to names. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Display the log ID for each socket. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Display the flowid and flowtype for each socket. flowid is a 32 bit hardware specific identifier for each flow. flowtype defines which protocol fields are hashed to produce the id. A complete listing is available in sys/mbuf.h under M_HASHTYPE_*. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Show network addresses as numbers (as with
| |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Display diagnostic information from the TCP control block. Fields include the number of packets requiring retransmission, received out-of-order, and those advertising a zero-sized window. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Avoid truncating addresses even if this causes some fields to overflow. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Display socket buffer and TCP timer statistics for each
internet socket.
The
| |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Filter by protocol_family. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Filter by protocol. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Use an alternative core. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
Use an alternative kernel image. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||
netstat
When
netstat
is invoked with
| |
| |
Show IPv4 only. See GENERAL OPTIONS. | |
| |
Show IPv6 only. See GENERAL OPTIONS. | |
| |
Multicast addresses currently in use are shown for each Ethernet interface and for each IP interface address. Multicast addresses are shown on separate lines following the interface address with which they are associated. | |
| |
Show the number of bytes in and out. | |
| |
Show the number of dropped packets. | |
| |
Print all counters in human readable form. | |
| |
Do not resolve numeric addresses and port numbers to names. See GENERAL OPTIONS. | |
| |
Avoid truncating addresses even if this causes some fields to overflow. See GENERAL OPTIONS. | |
| |
Filter by protocol_family. See GENERAL OPTIONS. | |
netstat
When
netstat
is invoked with the
| |
| |
Only show information regarding interface | |
| |
Show IPv4 only. See GENERAL OPTIONS. | |
| |
Show IPv6 only. See GENERAL OPTIONS. | |
| |
Show the number of dropped packets. | |
| |
Use an alternative core. See GENERAL OPTIONS. | |
| |
Use an alternative kernel image. See GENERAL OPTIONS. | |
| |
Exit after howmany outputs. | |
netstat
| |
| |
Show IPv4 only. See GENERAL OPTIONS. | |
| |
Show IPv6 only. See GENERAL OPTIONS. | |
| |
If
| |
| |
Reset statistic counters after displaying them. | |
| |
Filter by protocol_family. See GENERAL OPTIONS. | |
| |
Filter by protocol. See GENERAL OPTIONS. | |
| |
Use an alternative core. See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
| |
| |
Show IPv4 only See GENERAL OPTIONS. | |
| |
Show IPv6 only See GENERAL OPTIONS. | |
| |
If
| |
| |
Filter by protocol_family. See GENERAL OPTIONS. | |
| |
Filter by protocol. See GENERAL OPTIONS. | |
| |
Use an alternative core See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
| |
| |
Use an alternative core See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
The
bpf(4)
flags displayed when
netstat
is invoked with the
For more information about these flags, please refer to bpf(4). | |||||||||||||
| |||||||||||||
Reset statistic counters after displaying them. | |||||||||||||
netstat
When
netstat
is invoked with the routing table option
Direct routes are created for each interface attached to the local host; the gateway field for such entries shows the address of the outgoing interface. The refcnt field gives the current number of active uses of the route. Connection oriented protocols normally hold on to a single route for the duration of a connection while connectionless protocols obtain a route while sending to the same destination. The use field provides a count of the number of packets sent using that route. The interface entry indicates the network interface utilized for the route. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Show IPv4 only. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Show IPv6 only. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Do not resolve numeric addresses and port numbers to names. See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Show the path MTU for each route, and print interface names with a wider field size. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Display the routing table with the number
fibnum.
If the specified
fibnum
is -1 or
| |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Display the routing table for a particular address_family. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Use an alternative core See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
Use an alternative kernel image See GENERAL OPTIONS. | |||||||||||||||||||||||||||||||||||||||||||
netstat
| |
| |
If
| |
| |
Use an alternative core See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
| |
| |
Show IPv4 only See GENERAL OPTIONS. | |
| |
Show IPv6 only See GENERAL OPTIONS. | |
| |
Avoid truncating addresses even if this causes some fields to overflow. | |
| |
Filter by protocol_family. See GENERAL OPTIONS. | |
| |
Use an alternative core See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
| |
| |
Show IPv4 only See GENERAL OPTIONS. | |
| |
Show IPv6 only See GENERAL OPTIONS. | |
| |
If
| |
| |
Filter by protocol_family. See GENERAL OPTIONS. | |
| |
Use an alternative core See GENERAL OPTIONS. | |
| |
Use an alternative kernel image See GENERAL OPTIONS. | |
netstat
| ||||||||||
| |
Is shorthand for
| |
| |
Is shorthand for
| |
| |
Limit display to those records
of the specified
address_family
or a single
protocol.
The following address families and protocols are recognized:
| |
Family | Protocols |
inet ( AF_INET) | divert, icmp, igmp, ip, ipsec, pim, sctp, tcp, udp |
inet6 ( AF_INET6) | icmp6, ip6, ipsec6, rip6, sctp, tcp, udp |
pfkey ( PF_KEY) | pfkey |
netgraph, ng ( AF_NETGRAPH) | ctrl, data |
unix ( AF_UNIX)
link ( AF_LINK) | |
The program will complain if protocol is unknown or if there is no statistics routine for it.
| Extract values associated with the name list from the specified core instead of the default /dev/kmem. |
| Extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. |
| Show network addresses and ports as numbers. Normally netstat attempts to resolve addresses and ports, and display them symbolically. |
|
Wider output; expand address fields, etc, to avoid truncation.
Non-numeric values such as domain names may still be truncated; use the
|
IPv6 support was added by WIDE/KAME project.
NETSTAT (1) | September 25, 2020 |
Main index | Section 1 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Unix’s “power tools” are more like power switchblades that slice off the operator’s fingers quickly and efficiently. | ” |
— The Unix Haters' handbook |