Skip to content

Netstat

Netstat

Show all connections

1
    netstat -a

Show only Connection by State

1
2
3
4
    netstat | findstr ESTABLISHED
    netstat | findstr LISTENING
    netstat | findstr CLOSE_WAIT
    netstat | findstr TIME_WAIT

Show Process ID used by Port Number

1
2
    netstat -o
    netstat –o | findstr <PORT>

Show Protocol Statistics and Find Errors

1
2
    netstat –s
    inetstat -s | findstr Errors

Show Routing Information

1
    netstat –r

Show Interface Statistics

1
    netstat -e

Show Fully Qualified Domain Name of foreign address (remote host)

1
2
    netstat –f
    netstat –f | findstr ESTABLISHED