请教关于netstat的一个问题

hanxing1026
请教关于netstat的一个问题

在命令行终端下,root用户执行  netstat -lnp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN      -        

看不到使用这个端口的进程名字。。。
这个是为什么?

7717060
你可以用lsof -i :端口号

sdu_lizhipeng
lsof -i tcp:8090

xuledw
[quote]原帖由 [i]hanxing1026[/i] 于 2008-5-26 11:46 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6595110&ptid=1005865][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
在命令行终端下,root用户执行  netstat -lnp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp  ... [/quote]
应该可以看到吧
[root@test ~]# netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 127.0.0.1:199               0.0.0.0:*                   LISTEN      2238/snmpd         
tcp        0      0 0.0.0.0:873                 0.0.0.0:*                   LISTEN      2315/xinetd         
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      2372/mysqld         
tcp        0      0 0.0.0.0:943                 0.0.0.0:*                   LISTEN      2033/rpc.statd      
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1998/portmap
最后那个不是吗
例如第三行3306端口就是mysqld

wyx823
netstat -ntl 用这个参数看看.

hanxing1026
谢谢各位的回帖

但是我想弄明白为什么netstat不能显示某些监听进程的PID和Program name   

是不是某些进程在代码编写时使用了某些特殊的方法

李某人
[quote]原帖由 [i]hanxing1026[/i] 于 2008-5-27 10:05 发表 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=6596482&ptid=1005865][img]http://linux.chinaunix.net/bbs/images/common/back.gif[/img][/url]
谢谢各位的回帖

但是我想弄明白为什么netstat不能显示某些监听进程的PID和Program name   

是不是某些进程在代码编写时使用了某些特殊的方法 [/quote]


哪些进程?举例

Axin
学习学习学习学习学习学习

todaypuzzleme
这些进程应该是作为系统服务存在的,例如inetd下的ftp,web等,使用Netstat确实无法查看相关的PID