JSI Tip 7231. Netstat.exe from Windows NT 5.1, and greater, helps to determine which program uses or blocks a specific TCP port.
Jerold Schulman
September 22, 2003
2 Min Read
If you open a CMD prompt and type netstat -ano, you receive a display similar to:
Proto Local Address Foreign Address State PIDTCP 0.0.0.0:80 0.0.0.0:0 Listening 888
You can use Task Manger to match the PID (Process ID) to the program:
1. Start / Run / taskmgr / OK or press CTRL+ALT+DELETE and press Task Manager.
2. Select the Processes tab.
3. If the PID column is missing, press View / Select Columns, check the PID box, and press OK.
4. Press the PID column header to sort the processes by PID.
5. Match the PID from Netstat.exe to the PID in on the Processes tab to find the Image Name.
NOTE: When you type netstat /?, you receive:
Displays protocol statistics and current TCP/IP network connections.NETSTAT [-a] [-e] [-n] [-o] [-s] [-p proto] [-r] [interval] -a Displays all connections and listening ports. -e Displays Ethernet statistics. This may be combined with the -s option. -n Displays addresses and port numbers in numerical form. -o Displays the owning process ID associated with each connection. -p proto Shows connections for the protocol specified by proto; proto may be any of: TCP, UDP, TCPv6, or UDPv6. If used with the -s option to display per-protocol statistics, proto may be any of: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6. -r Displays the routing table. -s Displays per-protocol statistics. By default, statistics are shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6; the -p option may 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.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like