分类:
2010-08-26 12:50:45
知道这个端口被某个程序使用着,但是查不出来是个什么程序,有没有什么命令可以查看是哪个程序占用着它?
如何查看端口被哪个进程占用着?
如果没有任何输出,则说明这个断口没有被占用
如果别占用 了,则输出占用这个断口的进程
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.
not tcpcp
it is tcpcb
rmsock f100089c27a2358 tcpcb