好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

如何查看端口被占用_apache端口查询

经常,我们在启动应用的时候发现系统需要的端口被别的程序占用,如何知道谁占有了我们需要的端口,很多人都比较头疼,下面就介绍一种非常简单的方 法,希望对大家有用

假如我们需要确定谁占用了我们的9050端口

1、Windows平台

在windows命令行窗口下执行:

C:\>netstat -aon|findstr [9050″

TCP 127.0.0.1:9050 0.0.0.0:0 LISTENING 2016

看到了吗,端口被进程号为2016的进程占用,继续执行下面命令:

C:\>tasklist|findstr [2016″

tor.exe 2016 Console 0 16,064 K

很清楚吧,tor占用了你的端口

2、AIX

$netstat -Aan|grep 30542

f10000f303321b58 tcp4 0 0 *.30542 *.* LISTEN

$rmsock f10000f303321b58 tcpcb

The socket 0×3321800 is being held by proccess 692476 (db2sysc).

这 个我就不解释了

3、Linux

$netstat -pan|grep 2809

tcp 0 0 0.0.0.0:2809 0.0.0.0:* LISTEN 9493/java

查看更多关于如何查看端口被占用_apache端口查询的详细内容...

  阅读:56次