Eric Bergman-Terrell's Blog

Troubleshooting Tip: How to determine which programs are listening to which TCP/IP Ports
October 4, 2010

Run netstat -b to determine which programs are listening to which TCP/IP ports. For example, here's the output that I got when I ran netstat -b on my machine. Note: I've replaced the actual digits with X:

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    DIM3000:XXXX           localhost:XXXX         ESTABLISHED     XXXX
  [firefox.exe]

  TCP    DIM3000:XXXX           localhost:XXXX         ESTABLISHED     XXXX
  [firefox.exe]

  TCP    DIM3000:XXXX           XXX.XXX.X.X:XXXX       ESTABLISHED     XXXX
  c:\windows\system32\WS2_32.dll
  C:\WINDOWS\System32\WINHTTP.dll
  [svchost.exe]

  TCP    DIM3000:XXXX           server2005.re-invent.com:ms-sql-s  ESTABLISHED     XXXX
  [devenv.exe]

  TCP    DIM3000:XXXX           XX.XX.XX.XX:http       ESTABLISHED     XXXX
  [firefox.exe]

  TCP    DIM3000:XXXX           server2005.re-invent.com:ms-sql-s  TIME_WAIT       0

The Firefox browser (firefox.exe) was listening to three ports. Visual Studio 2005 (devenv.exe) was listening to one port.

netstat is useful for troubleshooting SQL Server connection pooling issues, plus it's useful for hunting down spyware on your machine.

Keywords: TCP/IP Ports, netstat

Reader Comments

Comment on this Blog Post

Recent Posts

TitleDate
Java Programming Tip: SWT Photo Frame ProgramOctober 31, 2016
Vault 3 (Desktop) Version 1.63 ReleasedSeptember 9, 2016
"Compliance with Court Orders Act of 2016"April 9, 2016
Disable "Visual Voicemail" on Android / T-MobileJanuary 17, 2016
IPv6 HumorDecember 10, 2015
Java Programming Tip: Specify the JVM time zoneDecember 7, 2015
Node.js / Express Programming Tip: Detect and Fix Memory LeaksOctober 27, 2015