Is there a way to examine the status of a specific port from the Windows command line? I know I can use netstat to examine all ports but netstat is slow and looking at a specific port probably isn't.
相关问题
- Inheritance impossible in Windows Runtime Componen
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- RMI Threads prevent JVM from exiting after main()
- CosmosDB emulator can't start since port is al
- fsc.exe is very slow because it tries to access cr
Use the lsof command "lsof -i tcp:port #", here is an example.
For port 80, the command would be : netstat -an | find "80" For port n, the command would be : netstat -an | find "n"
Here, netstat is the instruction to your machine
-a : Displays all connections and listening ports -n : Displays all address and instructions in numerical format (This is required because output from -a can contain machine names)
Then, a find command to "Pattern Match" the output of previous command.
You can use the
netstat
combined with the-np
flags and a pipe to thefind
orfindstr
commands.Basic Usage is as such:
So for example to check port 80 on TCP, you can do this:
netstat -np TCP | find "80"
Which ends up giving the following kind of output:As you can see, this only shows the connections on port 80 for the TCP protocol.
Here is the easy solution of port finding...
when I have problem with WAMP apache , I use this code for find which program is using port 80.
3068
is PID, so I can find it from task manager and stop that process.it will give you number of sockets active on a specific IP and port(Server port number)