Displays active Transmission Control Protocol (TCP) connections,
ports on which the computer is listening, Ethernet statistics, the
Internet Protocol (IP) routing table, and IP statistics (for the
IP, Internet Control Message Protocol [ICMP], TCP, and User
Datagram Protocol [UDP] protocols). Used without parameters,
netstat(1) displays active TCP connections.
The options are as follows:
-a
Displays all connections and listening ports.
-e
Displays Ethernet statistics. This can be combined with the
-s option.
-n
Displays addresses and port numbers in numerical form.
-pprotocol
Shows connections for the specified protocol, which can
be TCP or UDP. If used with the -s option to display
per-protocol statistics, protocol can be TCP, UDP, or
IP.
-r
Displays the routing table.
-s
Displays per-protocol statistics. By default, statistics are
shown for TCP, UDP and IP; the -p option can be used to
specify a subset of the default.
interval
Redisplays selected statistics, pausing interval seconds
between each display. Press CTRL+C to stop redisplaying statistics.
If omitted, netstat will print the current configuration
information once.