Howto: See if a local port is listening from command prompt

List local/remote socket and PID  for all TCP connections in “Established” state:

netstat -ano | find /i "established"

List local/remote socket for all TCP connections in “Established” state (sometimes you get more than above):

netstat -an | find /i "established"

List connections over time (netstat_check_connections.bat):

@echo off
for /L %%X in (1,1,4) do (netstat -b >> C:\connections.txt)&(PING 127.0.0.1 -n 1 -w %5 2>NUL | FIND "TTL=" >NUL)

For other great command line kung foo check out synjunkie

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>