Netstat filtering query
Running Windows 2008 Server I have run: netstat -ano | findstr <PID> To find the IP's, state, and port of all connections relating to a certain PID. What I want to do now is just filter off those relating to port 25 and in ESTABLISHED state Does anyone know how I can do this?
April 14th, 2011 10:22pm

You should be able to just pipe findstr commands together...this did it on my computer: netstat -ano | findstr :25 | findstr ESTABLISHED I hope this helps! Dave Bishop Content Publishing Manager Windows Server Networking Information Experience Team Microsoft Corporation
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 11:44pm

Or you can do it with regular expressions to avoid running it through the findstr process twice. This also allows you to match a single line based on multiple elements with logical AND and OR etc. netstat -ano | findstr :25.*EST netstat -ano | findstr "80.*EST | 443.*EST"
September 19th, 2011 9:05pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics