免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 26792 | 回复: 8
打印 上一主题 下一主题

[新手入门] 如何查看端口被哪个进程占用着? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-30 10:02 |只看该作者 |倒序浏览
我用命令:

  1. netstat -an | grep 18000
复制代码

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

论坛徽章:
0
2 [报告]
发表于 2005-05-30 12:41 |只看该作者

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

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

论坛徽章:
0
3 [报告]
发表于 2005-06-02 21:56 |只看该作者

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

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

论坛徽章:
0
4 [报告]
发表于 2006-02-07 15:12 |只看该作者
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.

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
5 [报告]
发表于 2006-02-13 13:28 |只看该作者
not  tcpcp
it is tcpcb

rmsock f100089c27a2358 tcpcb

论坛徽章:
0
6 [报告]
发表于 2006-02-22 08:21 |只看该作者
谢谢又学了一点东西

论坛徽章:
0
7 [报告]
发表于 2006-02-22 09:48 |只看该作者
原帖由 chinadns 于 2006-2-13 13:28 发表
not  tcpcp
it is tcpcb

rmsock f100089c27a2358 tcpcb



正解。。。

论坛徽章:
0
8 [报告]
发表于 2008-01-15 15:23 |只看该作者
# netstat -tulpn | grep 80
# killall -9   httpd    ( -9表示强行杀死进程,这样会产生很多垃圾的 )
# /etc/init.d/apache start       重启  apache 就行了。
参考: killall 命令。http://www.ifpubs.com/books/aix52/killall.htm

论坛徽章:
0
9 [报告]
发表于 2011-03-21 15:34 |只看该作者
学习。
原因,本人配置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>.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP