+ -
当前位置:首页 → 问答吧 → 如何查看端口被哪个进程占用着?

如何查看端口被哪个进程占用着?

时间:2005-05-30

来源:互联网

我用命令:
  1. netstat -an | grep 18000
复制代码

知道这个端口被某个程序使用着,但是查不出来是个什么程序,有没有什么命令可以查看是哪个程序占用着它?

作者: AllenYao   发布时间: 2005-05-30

如果没有任何输出,则说明这个断口没有被占用
如果别占用 了,则输出占用这个断口的进程

作者: qinyun.it.epri   发布时间: 2005-05-30

装个一个第三方的lsof软件就 可以了

作者: sunbeat   发布时间: 2005-06-02

Issue the command:
netstat -Aan | grep 389

this will return:

f1000089c27a2358 tcp4 0 0 *.389 *.* LIST EN

The next step is to take this value that was generated, f1000089c27a2358 and run it against the rmsock command:

rmsock f100089c27a2358 tcpcp

this command will return the process that is holding the socket.

The socket 0xc27a2000 is being held by process 204914 (ndsd).


In this case, Novel Directory Server was already installed on this system and was using port 389.

作者: microyong   发布时间: 2006-02-07

not  tcpcp
it is tcpcb

rmsock f100089c27a2358 tcpcb

作者: chinadns   发布时间: 2006-02-13

谢谢又学了一点东西

作者: wobuzhidao   发布时间: 2006-02-22



QUOTE:
原帖由 chinadns 于 2006-2-13 13:28 发表
not  tcpcp
it is tcpcb

rmsock f100089c27a2358 tcpcb




正解。。。

作者: Jens   发布时间: 2006-02-22

# netstat -tulpn | grep 80
# killall -9   httpd    ( -9表示强行杀死进程,这样会产生很多垃圾的 )
# /etc/init.d/apache start       重启  apache 就行了。
参考: killall 命令。http://www.ifpubs.com/books/aix52/killall.htm

作者: phantast   发布时间: 2008-01-15

学习。
原因,本人配置Lotus Domino IE端连接不上http服务。怀疑80端口呗占用。
#netstat -Aan|grep 80
f100060000bb5398 tcp4 0 0 *.80 *.* listen
......
#rmsock f100060000bb5398 tcpcb
The socket 0xbb5008 is being held by proccess 69950 <http>.

作者: 啸cxcn   发布时间: 2011-03-21

热门下载

更多