Displays active TCP connections, ports on which the computer is listening, Ethernet statistics , the IP routing table, IPv4 statistics (for the IP, ICMP , TCP , and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.
Syntax
netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]
Switches:
-A Shows the addresses of any associated protocol control blocks.
-a Will show the status of all sockets. Sockets associated with network
server processes are normally not shown.
-I Shows the state of the network interfaces.
-m Prints the network memory usage.
-n Causes netstat to show actual addresses as opposed tohostnames or
network names.
-r Prints the routing table.
-s Tells netstat to show the per protocol statistics.
-t Replaces the queue length information with timer information.
Examples
To display both the Ethernet statistics and the statistics for all protocols, type the following command: netstat -e -s
To display the statistics for only the TCP and UDP protocols, type the following
To display active TCP connections and the process IDs every 5 seconds, type the following command: nbtstat -o 5
To display active TCP connections and the process IDs using numerical form, type the following command: nbtstat -n -o
Syntax
netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]
Switches:
-A Shows the addresses of any associated protocol control blocks.
-a Will show the status of all sockets. Sockets associated with network
server processes are normally not shown.
-I Shows the state of the network interfaces.
-m Prints the network memory usage.
-n Causes netstat to show actual addresses as opposed tohostnames or
network names.
-r Prints the routing table.
-s Tells netstat to show the per protocol statistics.
-t Replaces the queue length information with timer information.
Examples
To display both the Ethernet statistics and the statistics for all protocols, type the following command: netstat -e -s
To display the statistics for only the TCP and UDP protocols, type the following
command: netstat -s -p tcp udp
To display active TCP connections and the process IDs every 5 seconds, type the following command: nbtstat -o 5
To display active TCP connections and the process IDs using numerical form, type the following command: nbtstat -n -o