ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 根据端口号查询相应的进程

根据端口号查询相应的进程

原创 Linux操作系统 作者:cargoo 时间:2010-03-05 16:48:22 0 删除 编辑
1、首先根据端口号得到协议控制块
netstat -Aan | grep 389

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

-A   Shows the address of any protocol control blocks associated with the sockets. This flag acts with the default display and is used for debugging purposes.

2、rmsock f100089c27a2358 tcpcb
The socket 0x702f6800 is being held by proccess 4986 (inetd) 得到PID为4986

3、得到进程名称:ps -ef  | grep 4986

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/5359/viewspace-628744/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: AIX 10gR2 DBCONSOLE
请登录后发表评论 登录
全部评论
熟悉Oracle、MySQL、PostgreSQL, 熟悉WebLogic

注册时间:2009-02-10

  • 博文量
    105
  • 访问量
    235417