确定应用程序使用的端口的最佳方法是什么?

时间:2022-02-19 18:12:57

This is an adapted version of a question from someone in my office. She's trying to determine how to tell what ports MSDE is running on for an application we have in the field.

这是我办公室某个人的问题的改编版。她正在尝试确定如何告诉MSDE在一个应用程序上运行的端口。

Answers to that narrower question would be greatly appreciated. I'm also interested in a broader answer that could be applied to any networked applications.

对这一狭窄问题的回答将会得到极大的赞赏。我还对一个更广泛的答案感兴趣,它可以应用于任何网络应用程序。

4 个解决方案

#1


7  

I've always liked the sysinternals app TCPView, which can now be found here. Good luck.

我一直喜欢sysinternals应用TCPView,现在可以在这里找到。祝你好运。

#2


11  

netstat -b

from the command line will display the application name, process owner, address, and port number used for all running applications.

从命令行将显示用于所有正在运行的应用程序的应用程序名称、进程所有者、地址和端口号。

#3


6  

netstat -b is a great answer, you may need to use the -a option as well.

netstat -b是一个很好的答案,您可能还需要使用-a选项。

Without -a netstat shows active connections, with -a it shows listening ports with no active clients as well.

没有一个netstat显示活跃的连接,它显示了侦听端口,并且没有活动的客户机。

#4


2  

Download currports from here.

从这里下载currports。

It will show you which ports are open and which processes are associated with each port.

它将显示哪些端口是打开的,哪些进程与每个端口相关联。

Scroll down to: Download CurrPorts

向下滚动到:下载当前端口

#1


7  

I've always liked the sysinternals app TCPView, which can now be found here. Good luck.

我一直喜欢sysinternals应用TCPView,现在可以在这里找到。祝你好运。

#2


11  

netstat -b

from the command line will display the application name, process owner, address, and port number used for all running applications.

从命令行将显示用于所有正在运行的应用程序的应用程序名称、进程所有者、地址和端口号。

#3


6  

netstat -b is a great answer, you may need to use the -a option as well.

netstat -b是一个很好的答案,您可能还需要使用-a选项。

Without -a netstat shows active connections, with -a it shows listening ports with no active clients as well.

没有一个netstat显示活跃的连接,它显示了侦听端口,并且没有活动的客户机。

#4


2  

Download currports from here.

从这里下载currports。

It will show you which ports are open and which processes are associated with each port.

它将显示哪些端口是打开的,哪些进程与每个端口相关联。

Scroll down to: Download CurrPorts

向下滚动到:下载当前端口