免费注册 查看新帖 |

Chinaunix

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

怎样看某进程占用的端口号。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-27 19:31 |只看该作者 |倒序浏览
不要告诉我用lsof。
也许你的工作环境没有安装。但是你又非常想知道这些信息。
3x。

论坛徽章:
0
2 [报告]
发表于 2004-12-28 03:19 |只看该作者

怎样看某进程占用的端口号。

The information can be gotten by running netstat, rpcinfo and
checking /etc/inet.d and /etc/services.  But if the corresponding
program that provides the service is not obvious to you, you have
to  use lsof to find the program that offers the service.

论坛徽章:
0
3 [报告]
发表于 2004-12-28 09:00 |只看该作者

怎样看某进程占用的端口号。

/proc
pfiles 好像

论坛徽章:
0
4 [报告]
发表于 2004-12-28 10:03 |只看该作者

怎样看某进程占用的端口号。

谁能详细解释下pfiles的用法?谢谢

论坛徽章:
0
5 [报告]
发表于 2004-12-28 11:42 |只看该作者

怎样看某进程占用的端口号。

pfiles just report fstat(2) and fcntl(2) information for all open files in each process.

It doesn't include any port information.

论坛徽章:
0
6 [报告]
发表于 2004-12-28 12:42 |只看该作者

怎样看某进程占用的端口号。

solaris 8 pfiles methods :
example5# cd /proc ; /usr/proc/binpfiles * | egrep "^[0-9]|sockname" | more
....
968:       in.ftpd
         sockname: AF_INET6 ::ffff:10.1.1.77   port: 21
         sockname: AF_INET6 ::ffff:10.1.1.77   port: 21
or
example6# su
# cd /proc
# /usr/proc/bin/pfiles * >; /tmp/pfiles.out
# vi /tmp/pfiles.out
/port: PortOfInterest
?^[0-9]

论坛徽章:
0
7 [报告]
发表于 2004-12-28 14:21 |只看该作者

怎样看某进程占用的端口号。

ps -ef|grep servername

论坛徽章:
0
8 [报告]
发表于 2004-12-28 20:13 |只看该作者

怎样看某进程占用的端口号。

感谢infinite(圣骑士)。
用你的方法,我已经看出来。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP