Home > Commands N-Z > Commands N

NETSTAT


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Displays protocol statistics and current TCP/IP network connections. This command is available only if the TCP/IP protocol has been installed.


Syntax

NETSTAT /?

NETSTAT [-a] [-e] [-n] [-o] [-p protocol] [-r] [-s] [interval]


Parameters
interval (NT3.1)
Redisplays selected statistics, pausing interval seconds between each display. Press CTRL+B (^B) to stop redisplaying statistics. If this parameter is omitted, netstat prints the current configuration information once.

Switches
/? (NTXP)
Displays help.
-a (NT3.1)
Displays all connections and listening ports. Server connections are normally not shown.
-e (NT3.1)
Displays Ethernet statistics. This may be combined with the -s option.
-n (NT3.1)
Displays addresses and port numbers in numerical form (rather than attempting name look-ups).
-o (NTXP)
Displays active TCP connections and includes the process ID (PID) for each connection. You can find the application based on the PID on the Processes tab in Windows Task Manager. This parameter can be combined with -a, -n, and -p.
-p protocol (NT3.1)
Shows connections for the protocol specified by protocol; protocol can be tcp or udp (also tcpv6 or udpv6 with NTXP). If used with the -s option to display per-protocol statistics, protocol can be tcp, udp, icmp, or ip (also tcpv6, udpv6, icmpv6 or ipv6 with NTXP).
-r (NT3.1)
Displays the contents of the routing table.
-s (NT3.1)
Displays per-protocol statistics. By default, statistics are shown for TCP, UDP, ICMP, and IP. The -p option can be used to specify a subset of the default.

Related

none.


Notes

none.


Examples

none.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NT3.1 NT3.5 NT3.51 NT4 NT2000 NTXP NT2003

Last Updated: 2006/12/01
Direct corrections or suggestions to: Rick Lively